More benchmarks for the `node:test` module.
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 122k
- Fork
- 37.3k
- Merge medio
- 4g 2h
- PR unite (30g)
- 283
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in benchmark/test_runner e passa in rassegna i benchmark esistenti per it, describe e le funzionalità completate di test-runner. Aggiungi benchmark per i casi non spuntati mock.timers, mock.module, snapshot e coverage, usando un reporter personalizzato e --expose-internals per coverage. Il lavoro è completo quando gli elementi rimanenti della checklist sono coperti senza logica speciale per i benchmark.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- devtools, testing-qa
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100