Support `concurrency` when `--experimental-test-isolation` is set to `'none'`
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
doc/api/cli.md の --experimental-test-isolation のドキュメントから始め、既存の並行性の制約について、元の PR #53927 と issue #51548 を読んでください。node --test のエントリーポイントを追跡し、並行して動作する非分離 worker がどのように振る舞うべきかを判断してください。要求された flag の組み合わせをサポートし、そのセマンティクスを文書化すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, nodejs
- 領域
- cli, testing-qa
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100