Skip to content

Commit e4c08f4

Browse files
committed
fixup! test: improve UV_THREADPOOL_SIZE tests on .env
1 parent 7b7c6e0 commit e4c08f4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/parallel/test-dotenv-node-options.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const common = require('../common');
44
const assert = require('node:assert');
5+
const path = require('node:path');
56
const { describe, it } = require('node:test');
67

78
if (process.config.variables.node_without_node_options) {
@@ -59,9 +60,11 @@ describe('.env supports NODE_OPTIONS', () => {
5960
});
6061

6162
it('should update UV_THREADPOOL_SIZE', async () => {
63+
const filePath = path.join(__dirname, `../node-api/test_uv_threadpool_size/build/${common.buildType}/test_uv_threadpool_size`);
6264
const code = `
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+
const { test } = require('${filePath}');
66+
const size = parseInt(process.env.UV_THREADPOOL_SIZE, 10);
67+
require('assert').strictEqual(size, 5);
6568
test(size);
6669
`.trim();
6770
const child = await common.spawnPromisified(

0 commit comments

Comments
 (0)