Support `concurrency` when `--experimental-test-isolation` is set to `'none'`
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 122k
- Forks
- 37.3k
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 283
Descripción
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: https://github.com/nodejs/node/blob/f270462c09ddfd770291a7c8a2cd204b2c63d730/doc/api/cli.md#L2252-L2264
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la documentación de --experimental-test-isolation en doc/api/cli.md; después, lee el PR original #53927 y el issue #51548 sobre las restricciones de concurrencia existentes. Sigue el punto de entrada de node --test y determina cómo deberían comportarse los workers concurrentes y no aislados; el trabajo se considera completado cuando se admita la combinación de flags solicitada y se documenten sus semánticas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, nodejs
- Área
- cli, testing-qa
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100