More benchmarks for the `node:test` module.
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 122k
- フォーク
- 37.3k
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 283
説明
The benchmark/test_runner folder currently contains benchmarks for it and describe functions. I suggest we expand these benchmarks to cover additional test runner features, including mocks, coverage, and various test modes.
Here are the functions that (IMO) should be benchmarked:
Basic Testing
These tests should run with a custom reporter without any special logic to make the tests as accurate as possible.
-
test- Create a
test(#56479) - Create a
testwhen it's not running due toonly - Add a subtest
- Skip a test
- Via
skip: true - Via
t.skip() - Via
t.skip(...)
- Via
- TODO tests
- Via
todo: true - Via
t.todo() - Via
t.todo(...)
- Via
- Create a
Hooks
-
beforeEach -
afterEach -
before -
after
Reporters (#55757)
-
dot -
junit -
spec -
tap -
lcov
Mocking
-
mock.fn(#55771) -
mock.timersfor each API, and each sub-function -
mock.module
Snapshots
-
snapshot.setDefaultSnapshotSerializers(serializers) -
snapshot.setResolveSnapshotPath(fn) -
t.assert.snapshot
Coverage
Use --expose-internals to exclusively test the coverage part
- Basic
- Excluding files
- Including files
- With source maps
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
benchmark/test_runnerから始め、it、describe、および完了済みのtest-runner機能に関する既存のベンチマークを確認します。未チェックのmock.timers、mock.module、snapshot、coverageのケースについて、coverageにはカスタムreporterと--expose-internalsを使用してベンチマークを追加します。残りのチェックリスト項目が特別なベンチマークロジックなしでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- devtools, testing-qa
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100