Test Runner docs could use more information on the concept of a Suite
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
Affected URL(s)
https://nodejs.org/docs/latest-v24.x/api/test.html
Description of the problem
The test runner docs could use more information regarding suites. Suites do behave subtly differently to a test with subtests. Documenting these difference is important.
For example, comparing and contrasting the difference in:
suite('s1', () => {
test('t1', () => {
assert.ok(true);
});
test('t2', () => {
assert.ok(true);
});
});
And then the equivalent:
test('s1', async (ctx) => {
await ctx.test('t1', () => {
assert.ok(true);
});
await ctx.test('t2', () => {
assert.ok(true);
});
});
I'm sure there is more details to mention too but this comparison stands out the most to me.
It also feels like the docs are missing this section because as you read the page top-to-bottom, you get to the Subtests section and it mentions:
This is necessary because tests do not wait for their subtests to complete, unlike tests created within suites.
Without ever actually introducing what a "suite" is.
I understand the concept of a "suite" is generally well understood in the context of a any test runner, but nonetheless the specifics for Node's version of it is important to detail as devs work to convert from other testing frameworks where they may be familiar with different assumptions for what a "suite" vs "test" is.
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
Comienza con la documentación de Test Runner en la URL afectada, especialmente con la sección Subtests y sus referencias a las suites. Compara los ejemplos de suites y nested tests del issue y documenta qué es una suite de Node.js y en qué se diferencia su comportamiento del de los tests con subtests; se considerará terminado cuando los lectores encuentren esta explicación antes de la sección Subtests.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript
- Área
- documentation
- Tipo de issue
- Documentación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 70/100