test_runner: todo/skip/expectFailure are truthy per docs, but implementation is otherwise
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
Version
v25.6.1
Subsystem
node:test
What steps will reproduce the bug?
Add the todo, skip or testFailure option to a test, setting it to an empty string. The result will be the same as if you set it to true or a non-empty string.
What is the expected behavior? Why is that the expected behavior?
Unsure whether the bug is in the code or in the API docs.
The code clearly does not treat these options as truthy:
https://github.com/nodejs/node/blob/2de34822cc9a19621a663e3f22b00b9a01697635/lib/internal/test_runner/test.js#L639-L641
But the docs specifically state they should be:
Additional information
Previous discussions:
- Three years ago: https://github.com/nodejs/node/pull/47537#pullrequestreview-1383887199 @ljharb
- More recently as part of
expectFailuredevelopment: https://github.com/nodejs/test-runner/pull/10#discussion_r2739831598 @JakobJingleheimer
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
lib/internal/test_runner/test.js の 639-641 行付近と、doc/api/test.md の 1691-1696 行付近にあるオプションの説明から始めてください。空文字列を有効として扱うべきか、それともドキュメントが誤っているのかを判断するため、リンクされた議論を確認してください。ドキュメントと実装が一致し、空、true、空でない値を対象とするカバレッジがあれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- testing-qa
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100