You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test runner: --test-reporter-destination should create the folder if not found聽#64994
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 .gitkeep file, but it's cumbersome
Having the CLI test script 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
changed the title [-]Test ruuner: --test-reporter-destination should create the folder if not found[/-][+]Test runner: --test-reporter-destination should create the folder if not found[/+]on Aug 3, 2026
Activity
[-]Test ruuner: --test-reporter-destination should create the folder if not found[/-][+]Test runner: --test-reporter-destination should create the folder if not found[/+]