windows issues
@gotwarlost Normal usage on Windows always throws this exceptions:
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Object.Module._extensions.(anonymous function) [as .js] (C:\xxx\node_modules\istanbul\lib\hook.js:109:37)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Function.Module.runMain (module.js:575:10)
NPM Script
istanbul cover --report json node_modules/.bin/_mocha -- -u exports -R spec test/index.js",
the same question
I'm using this command on Mac and Windows and it's working. Hope this helps.
./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha
Give this a read, https://github.com/gotwarlost/istanbul/issues/677
It was my similar question that the answer fixed my problem.
I have similar issues using
babel-node ./node_modules/.bin/babel-istanbul cover ./node_modules/mocha/bin/_mocha --require ./node_modules/dotenv/config -- --timeout 10000 --recursive app/tests
I tried with ./node_modules/.bin/babel-node but no luck.
Any help will be appreciated.
I use this, works great.
./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --require --compilers js:babel-core/register./node_modules/dotenv/config -- --timeout 10000 --recursive app/tests
@kalote add a space after --compilers js:babel-core/register
I'm still getting the same issue please assist istanbul cover --report ./node_modules/.bin/_mocha -R spec