test_runner: todo/skip/expectFailure are truthy per docs, but implementation is otherwise
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
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
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 por lib/internal/test_runner/test.js alrededor de las líneas 639-641 y por las descripciones de las opciones en doc/api/test.md alrededor de las líneas 1691-1696. Revisa las discusiones enlazadas para determinar si las cadenas vacías deben tratarse como habilitadas o si la documentación es incorrecta. El trabajo está terminado cuando la documentación y la implementación coinciden y hay cobertura para valores vacíos, true y no vacíos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- testing-qa
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100