nodejs-testing
nodejs-testing copied to clipboard
Unable to add custom reporter and destination
Due to the fact that extension added --test-reporter without --test-reporter-destination here https://github.com/connor4312/nodejs-testing/blob/ee39d460a353f2bbaa01f513f94f207738c37b3c/src/runner-worker.ts#L130
I could not add my own reporters
so I have to add one additional --test-reporter-destination flag but it was not outlined nowhere in the documentation.
"nodejs-testing.extensions": [
{
"extensions": [
"mjs",
"cjs",
"js"
],
"parameters": [
"--experimental-require-module",
"--experimental-test-module-mocks",
"--experimental-test-coverage",
"--test-reporter-destination=coverage/lcov.info", // <-- this like a compensation
"--test-reporter-destination=coverage/lcov.info",
"--test-reporter=lcov",
"--test-reporter-destination=stdout",
"--test-reporter=spec"
]
}
],
Also I noted that by default node test runner uses "--experimental-test-snapshots" by default. I think that should be configurable rather than required flag
node --experimental-test-snapshots" "--test-reporter" "file:///.vscode/extensions/connor4312.nodejs-testing-1.7.0/out/runner-loader.js"