What is the problem this feature will solve?
It would be nice to be able to run multiple "workers" when using the none test isolation mode.
Today, according to the docs, when --experimental-test-isolation is set to 'none', it implies 1 concurrency:
|
### `--test-concurrency` |
|
|
|
<!-- YAML |
|
added: |
|
- v21.0.0 |
|
- v20.10.0 |
|
- v18.19.0 |
|
--> |
|
|
|
The maximum number of test files that the test runner CLI will execute |
|
concurrently. If `--experimental-test-isolation` is set to `'none'`, this flag |
|
is ignored and concurrency is one. Otherwise, concurrency defaults to |
|
`os.availableParallelism() - 1`. |
However, mocha another test runner that does not isolate tests, does accept a concurrency flag: https://mochajs.org/#parallel-tests
What is the feature you are proposing to solve the problem?
We're looking to move off of jest because its test module isolation is extremely slow. We love the idea of using the node-native test runner with isolation disabled, instead of adopting another third-party framework like mocha.
However, we'd need to write some custom code (e.g., using parallel) to spin up n concurrent, isolation-disabled tests to effectively utilize all the cores available on our CI machine.
The docs and other recent comments all indicate that when --experimental-test-isolation is set to 'none', concurrency must be 1. However, I couldn't find the reasoning in the original PR or issue.
There's probably a good reason for this but, as someone not intimately familiar with the implementation, it's not obvious to me why we wouldn't be able to run non-isolated tests concurrently, like in mocha.
What alternatives have you considered?
I could probably use a tool like parallel to spin up multiple calls to node --test. However, this would require me to also write code to split up all the test files between the parallel runs, etc.
What is the problem this feature will solve?
It would be nice to be able to run multiple "workers" when using the
nonetest isolation mode.Today, according to the docs, when
--experimental-test-isolationis set to'none', it implies 1 concurrency:node/doc/api/cli.md
Lines 2252 to 2264 in f270462
However,
mochaanother test runner that does not isolate tests, does accept a concurrency flag: https://mochajs.org/#parallel-testsWhat is the feature you are proposing to solve the problem?
We're looking to move off of
jestbecause its test module isolation is extremely slow. We love the idea of using the node-native test runner with isolation disabled, instead of adopting another third-party framework likemocha.However, we'd need to write some custom code (e.g., using
parallel) to spin upnconcurrent, isolation-disabled tests to effectively utilize all the cores available on our CI machine.The docs and other recent comments all indicate that when
--experimental-test-isolationis set to'none', concurrency must be1. However, I couldn't find the reasoning in the original PR or issue.There's probably a good reason for this but, as someone not intimately familiar with the implementation, it's not obvious to me why we wouldn't be able to run non-isolated tests concurrently, like in
mocha.What alternatives have you considered?
I could probably use a tool like
parallelto spin up multiple calls tonode --test. However, this would require me to also write code to split up all the test files between the parallel runs, etc.