node
node copied to clipboard
test_runner: introduce NODE_TEST_WORKER_ID for improved concurrent te…
ref: #55842
Added a new environment variable, NODE_TEST_WORKER_ID
, which ranges from 1 to N when --experimental-test-isolation=process
is enabled and defaults to 1 when --experimental-test-isolation=none
is used.
Before merging, I want to add some tests but haven't come up with a good approach yet. Here's what I aim to test:
- When
--experimental-test-isolation=process
is enabled, verify thatNODE_TEST_WORKER_ID
ranges from 1 to N. - When
--experimental-test-isolation=none
is used, ensure thatNODE_TEST_WORKER_ID
is set to 1.
Any suggestions on how to create such tests would be greatly appreciated!