@@ -8,7 +8,8 @@ if (process.config.variables.node_without_node_options) {
88 common . skip ( 'missing NODE_OPTIONS support' ) ;
99}
1010
11- const relativePath = '../fixtures/dotenv/node-options.env' ;
11+ const nodeOptionsPath = '../fixtures/dotenv/node-options.env' ;
12+ const uvThreadPoolPath = '../fixtures/dotenv/uv-threadpool.env' ;
1213
1314describe ( '.env supports NODE_OPTIONS' , ( ) => {
1415
@@ -18,7 +19,7 @@ describe('.env supports NODE_OPTIONS', () => {
1819 ` . trim ( ) ;
1920 const child = await common . spawnPromisified (
2021 process . execPath ,
21- [ `--env-file=${ relativePath } ` , '--eval' , code ] ,
22+ [ `--env-file=${ nodeOptionsPath } ` , '--eval' , code ] ,
2223 { cwd : __dirname } ,
2324 ) ;
2425 // NODE_NO_WARNINGS is set, so `stderr` should not contain
@@ -35,7 +36,7 @@ describe('.env supports NODE_OPTIONS', () => {
3536 ` . trim ( ) ;
3637 const child = await common . spawnPromisified (
3738 process . execPath ,
38- [ `--env-file=${ relativePath } ` , '--eval' , code ] ,
39+ [ `--env-file=${ nodeOptionsPath } ` , '--eval' , code ] ,
3940 { cwd : __dirname } ,
4041 ) ;
4142 assert . match ( child . stderr , / E r r o r : A c c e s s t o t h i s A P I h a s b e e n r e s t r i c t e d / ) ;
@@ -50,7 +51,7 @@ describe('.env supports NODE_OPTIONS', () => {
5051 ` . trim ( ) ;
5152 const child = await common . spawnPromisified (
5253 process . execPath ,
53- [ `--env-file=${ relativePath } ` , '--eval' , code ] ,
54+ [ `--env-file=${ nodeOptionsPath } ` , '--eval' , code ] ,
5455 { cwd : __dirname } ,
5556 ) ;
5657 assert . strictEqual ( child . stderr , '' ) ;
@@ -59,11 +60,13 @@ describe('.env supports NODE_OPTIONS', () => {
5960
6061 it ( 'should update UV_THREADPOOL_SIZE' , async ( ) => {
6162 const code = `
62- require('assert').strictEqual(process.env.UV_THREADPOOL_SIZE, '5')
63+ const { test } = require('../node-api/test_uv_threadpool_size/build/${ common . buildType } /test_uv_threadpool_size');
64+ const size = parseInt(process.env.UV_THREADPOOL_SIZE || 4, 10);
65+ test(size);
6366 ` . trim ( ) ;
6467 const child = await common . spawnPromisified (
6568 process . execPath ,
66- [ `--env-file=${ relativePath } ` , '--eval' , code ] ,
69+ [ `--env-file=${ uvThreadPoolPath } ` , '--eval' , code ] ,
6770 { cwd : __dirname } ,
6871 ) ;
6972 assert . strictEqual ( child . stderr , '' ) ;
0 commit comments