Test runner: --test-reporter-destination should create the folder if not found
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
What is the problem this feature will solve?
Hi 👋
Fairly easy one:
I have node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" outputting the coverage file to the coverage folder.
However, if the coverage folder does not exist beforehand, an ENOENT is thrown.
Since storing the behavior of storing coverage in coverage/lcov.info, and having that folder in .gitignore is rather standard, it'd be nice to have Node creating the folder in which it will place the coverage report in case it doesn't exist.
Thanks :)
What is the feature you are proposing to solve the problem?
When writing coverage report, check if the destination folder exists, and if not, create it beforehand
What alternatives have you considered?
- version controlling the coverage folder with a
.gitkeepfile, but it's cumbersome - Having the CLI
testscript in my package json create the folder itself, but that's quite inelegant to maintain for both Windows and Unix users - Switching to another test runner and losing all the charisma points that come with using the native one
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 reproduciendo el problema con el comando proporcionado node --test --experimental-code-coverage --test-reporter-destination="coverage/lcov.info" cuando coverage no existe. Rastrea el manejo del destino del reporter por parte del ejecutor de pruebas y verifica que la carpeta de destino se cree antes de escribir el informe de coverage, incluso cuando se necesitan carpetas anidadas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, node.js
- Área
- cli, testing-qa
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 68/100