Test Runner docs could use more information on the concept of a Suite
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
Affected URL(s)
https://nodejs.org/docs/latest-v24.x/api/test.html
Description of the problem
The test runner docs could use more information regarding suites. Suites do behave subtly differently to a test with subtests. Documenting these difference is important.
For example, comparing and contrasting the difference in:
suite('s1', () => {
test('t1', () => {
assert.ok(true);
});
test('t2', () => {
assert.ok(true);
});
});
And then the equivalent:
test('s1', async (ctx) => {
await ctx.test('t1', () => {
assert.ok(true);
});
await ctx.test('t2', () => {
assert.ok(true);
});
});
I'm sure there is more details to mention too but this comparison stands out the most to me.
It also feels like the docs are missing this section because as you read the page top-to-bottom, you get to the Subtests section and it mentions:
This is necessary because tests do not wait for their subtests to complete, unlike tests created within suites.
Without ever actually introducing what a "suite" is.
I understand the concept of a "suite" is generally well understood in the context of a any test runner, but nonetheless the specifics for Node's version of it is important to detail as devs work to convert from other testing frameworks where they may be familiar with different assumptions for what a "suite" vs "test" is.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
影響を受ける URL にある Test Runner のドキュメントから始め、特に Subtests セクションと、そこから参照されている suites を確認してください。Issue にある suite と nested-test の例を比較し、Node.js の suite とは何か、またその動作が subtests を持つテストとどのように異なるかを文書化してください。完了の条件は、読者が Subtests セクションの前にこの説明を読めることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 70/100