More benchmarks for the `node:test` module.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 122k
- Forks
- 37.3k
- Merge medio
- 4 d 2 h
- PR fusionados (30 d)
- 283
Descripción
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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza en benchmark/test_runner y revisa los benchmarks existentes para it, describe y las funcionalidades completadas de test-runner. Añade benchmarks para los casos no marcados mock.timers, mock.module, snapshot y coverage, usando un reporter personalizado y --expose-internals para coverage. Se considera terminado cuando los elementos restantes de la checklist estén cubiertos sin lógica especial para los benchmarks.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- devtools, testing-qa
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 52/100