test: fix addons and node-api test assumptions

PR-URL: https://github.com/nodejs/node/pull/55441
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Antoine du Hamel committed 2024-10-23 22:54:20 +02:00
1 parent 94e863cdb7
commit 6c8564b55d
3 files changed
+5 -13

No files matched your search

@@ -12,12 +12,9 @@ if (process.config.variables.node_without_node_options) {
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 filePath = path.join(__dirname, `./build/${common.buildType}/test_uv_threadpool_size`);
const code = `
const { test } = require('${filePath}');
const { test } = require(${JSON.stringify(filePath)});
const size = parseInt(process.env.UV_THREADPOOL_SIZE, 10);
require('assert').strictEqual(size, 4);
test(size);