Test Runner docs could use more information on the concept of a Suite
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 70/100
- Issue 類型
- 文件
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- javascript
研究方向
從受影響 URL 上的 Test Runner 文件開始,特別查看 Subtests 區段及其中對 suites 的參照。比較 issue 中的 suite 和 nested-test 範例,然後記錄 Node.js suite 是什麼,以及它的行為與帶有 subtests 的測試有何不同;完成的標準是讀者能在 Subtests 區段之前看到這項說明。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- JavaScript
- 星號
- 122k
- 分支
- 37.4k
- 平均合併
- 4 天 3 小時
- 30 天內合併 PR
- 273
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
nodejs/node 的其他 Issue
-
doc
難度 2/5 1-3 小時 新手友好度 65/100
-
build
難度 1/5 1 小時以內 新手友好度 88/100
-
難度 2/5 1-3 小時 新手友好度 84/100
-
難度 1/5 1 小時以內 新手友好度 90/100
-
feature request
難度 2/5 1-3 小時 新手友好度 68/100
相似的 Issue
-
curation good first issue
難度 2/5 1-3 小時 新手友好度 88/100
amponce/archive-movie-browser#186 ·
-
難度 2/5 1-3 小時 新手友好度 86/100
clerk/javascript#9852 ·
-
bug p1 tools
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 88/100
HarperFast/skills#96 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
難度 2/5 1-3 小時 新手友好度 84/100