-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Description
Version
v24.11.1
Platform
Darwin MacBook-Pro 23.6.0 Darwin Kernel Version 23.6.0: Wed May 14 13:51:39 PDT 2025; root:xnu-10063.141.1.705.2~2/RELEASE_ARM64_T6020 arm64
Subsystem
test runner
What steps will reproduce the bug?
This worked in Node 24.6.0, fails in anything later
I'm trying to write some integration tests for code that uses the bench-node library, and all of the tests run fine in node 22, but in node 24 they are getting errors,
bench-node module must be run with --allow-natives-syntax argument
I believe this is due to the test runner not running the tests with the same configuration the parent process was handed.
And since it's not legal to add the natives syntax as a NODE_OPTIONS flag, I have no workaround for this at present.
(You don't actually document how to run the tests without child processes from the CLI, only from a direct run() call)
How often does it reproduce? Is there a required condition?
download bench-node and try to run its tests with node 24.6.0, node 24.11.1
node --test --allow-natives-syntax --expose-gc
What is the expected behavior? Why is that the expected behavior?
The tests should run fine.
What do you see instead?
test at test/basic.js:194:1
✖ simple usage (0.032667ms)
Error: bench-node module must be run with --allow-natives-syntax argument
at throwIfNoNativesSyntax (/Users/jasonmarshall/Projects/cobbler/bench-node/lib/index.js:96:9)
at Suite.run (/Users/jasonmarshall/Projects/cobbler/bench-node/lib/index.js:198:3)
at SuiteContext.<anonymous> (/Users/jasonmarshall/Projects/cobbler/bench-node/test/basic.js:204:39)
at Suite.runInAsyncScope (node:async_hooks:214:14)
at Suite.createBuild (node:internal/test_runner/test:1476:13)
at new Suite (node:internal/test_runner/test:1467:28)
at Test.createSubtest (node:internal/test_runner/test:865:18)
at run (node:internal/test_runner/harness:364:28)
at test (node:internal/test_runner/harness:378:12)
at Object.<anonymous> (/Users/jasonmarshall/Projects/cobbler/bench-node/test/basic.js:194:1)
Additional information
No response