FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/test/node-api/test_uv_threadpool_size/node-options.js at main · fetchapi/node · GitHub
fetchapi
/
node
Public
forked from
nodejs/node
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
test
/
node-api
/
test_uv_threadpool_size
/
node-options.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
31 lines (27 loc) · 957 Bytes
Breadcrumbs
node
/
test
/
node-api
/
test_uv_threadpool_size
/
node-options.js
Copy path
File metadata and controls
31 lines (27 loc) · 957 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict'
;
const
common
=
require
(
'../../common'
)
;
const
assert
=
require
(
'assert'
)
;
const
path
=
require
(
'path'
)
;
const
{
spawnSync
}
=
require
(
'child_process'
)
;
if
(
process
.
config
.
variables
.
node_without_node_options
)
{
common
.
skip
(
'missing NODE_OPTIONS support'
)
;
}
const
uvThreadPoolPath
=
'../../fixtures/dotenv/uv-threadpool.env'
;
// Should update UV_THREADPOOL_SIZE
let
filePath
=
path
.
join
(
__dirname
,
`./build/
${
common
.
buildType
}
/test_uv_threadpool_size`
)
;
if
(
common
.
isWindows
)
{
filePath
=
filePath
.
replaceAll
(
'\\'
,
'\\\\'
)
;
}
const
code
=
`
const { test } = require('
${
filePath
}
');
const size = parseInt(process.env.UV_THREADPOOL_SIZE, 10);
require('assert').strictEqual(size, 4);
test(size);
`
.
trim
(
)
;
const
child
=
spawnSync
(
process
.
execPath
,
[
`--env-file=
${
uvThreadPoolPath
}
`
,
'--eval'
,
code
]
,
{
cwd
:
__dirname
,
encoding
:
'utf-8'
}
,
)
;
assert
.
strictEqual
(
child
.
stderr
,
''
)
;
assert
.
strictEqual
(
child
.
status
,
0
)
;
Back
|
FazBrowse Home
|
New Git URL