gotwarlost / istanbul

Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests and browser tests. Built for scale.
Other
8.7k stars 787 forks source link

Istanbul is testing mocha module instead of the project tests #742

Open chrissmejia opened 7 years ago

chrissmejia commented 7 years ago

Hi, I'm coding an opensource API and trying of integrate tests coverage:

https://github.com/chrissmejia/expressAPI/

I make it work using this line:

"cover": "istanbul cover --no-default-excludes --hook-run-in-context ./node_modules/mocha/bin/_mocha -- -R spec tests/**/*.test.ts --report lcovonly --compilers ts:ts-node/register"

The problem is that looks like testing the node module instead of the project tests:

https://coveralls.io/github/chrissmejia/expressAPI

Can someone please help me? I open an issue about it:

https://github.com/chrissmejia/expressAPI/issues/1

If you can give me a hint or push a patch I will really appreciate that, thanks ahead.