nodejs / nodejs/node

More benchmarks for the `node:test` module.

Abierto
#55,723 16 comentarios 5 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

benchmark test_runner
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 test when it's not running due to only
    • Add a subtest
    • Skip a test
      • Via skip: true
      • Via t.skip()
      • Via t.skip(...)
    • TODO tests
      • Via todo: true
      • Via t.todo()
      • Via t.todo(...)

Hooks

  • beforeEach
  • afterEach
  • before
  • after

Reporters (#55757)

  • dot
  • junit
  • spec
  • tap
  • lcov

Mocking

  • mock.fn (#55771)
  • mock.timers for 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

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. 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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.