runner.on is not a function
aorlowskiddm opened this issue · comments
I am trying to use mocha-junit-reporter
in combination with nyc
and ts-mocha
.
In package.json I have this excerpt:
"scripts": {
"test-ts": "ts-mocha \"./test/**/*.test.ts\"",
"nyc": "nyc --check-coverage --all --lines 50 --functions 50 --branches 50 --reporter=html --reporter=text --reporter=mocha-junit-reporter npm run test-ts"
},
After nyc finishes executing and all tests pass, I just see this, and no report is generated:
![image](https://private-user-images.githubusercontent.com/116679946/300942358-8765e153-0c39-4a89-8be7-67076f11fb73.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2MjE5MjMsIm5iZiI6MTcyMTYyMTYyMywicGF0aCI6Ii8xMTY2Nzk5NDYvMzAwOTQyMzU4LTg3NjVlMTUzLTBjMzktNGE4OS04YmU3LTY3MDc2ZjExZmI3My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMlQwNDEzNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNWIyNzI4NThkOWMxNzVmMjA2YWJlODUzOWQ1MzA5MDMxNzU5MTJjMGYyYTg5MzcxNGJkODY3NzY2ZGZlNjMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.vXne350_cio8ftMlAWcYsMGKDJZGu3gU5DC-gy8ulIk)
Perhaps mocha-junit-reporter
is incompatible with ts-mocha
? What is the suggested approach?