-
Notifications
You must be signed in to change notification settings - Fork 787
mocha Illegal Token Error #90
Comments
istanbul assumes that the Providing the relative path to the
|
Works great, thanks! |
Hi, I'm also having a similar issue when using mocha. All my tests run fine and I get a spec report in the console, but I get this message at the end:
I've tried several different combinations of running the tests (as mentioned above):
I've also tried with the mocha-lcov-reporter ( |
I've got an update. I've realised the reason why it's not working is because the tests are not using require to include the libs being tested (I'm testing 'plain JavaScript' and don't want to do My tests are using |
Try the
|
it works ,thank you! @gotwarlost |
Thank you, it works!@gotwarlost |
Makes the command work on Windows as well, see more info from gotwarlost/istanbul#90 (comment)
- Add 'npm run babel' command and run it on 'npm test' (supersedes PR knex#1011 - Ensure /lib is up to date during CI tests) - Fix 'npm test' command not working on Windows due to Istanbul config issue (see gotwarlost/istanbul#90) - Update CONTRIBUTING.md
(gotwarlost/istanbul#90). Put them back into npm prepublish.
(gotwarlost/istanbul#90). Put them back into npm prepublish.
Using windows 10 No cygwin, no mingw, no linux emulation, plain old Windows with bat and cmd files
I get:
|
In the end it is working, like this:
|
Still encounter this issue. Using Windows 10 |
* Fixed css handler deadlock. * Fix test command to also work on Windows, see gotwarlost/istanbul#90 (comment) * Updated test
i do like below, it works: |
I am on Windows 10 and installed "istanbul" globally (v0.4.5). My "npm test" script looks like this: "test": "istanbul cover node_modules/mocha/bin/_mocha -s 30000 -t 30000 --recursive test/harness.js test --trace-warnings" When I am running > istanbul cover node_modules/mocha/bin/_mocha -s 30000 -t 30000 --recursive test/harness.js test --trace-warnings
No coverage information was collected, exit without writing coverage information
D:\dev\projects\wireapp\proteus.js\node_modules\mocha\lib\utils.js:634
throw new Error("cannot resolve path (or pattern) '" + path + "'");
^
Error: cannot resolve path (or pattern) '30000'
at Object.lookupFiles (D:\dev\projects\wireapp\proteus.js\node_modules\mocha\lib\utils.js:634:15) Can you help me with this? |
Note: I also got a similar issue when running
What I needed to do is change: istanbul cover --report html jasmine To: istanbul cover --report html ./node_modules/jasmine/bin/jasmine.js |
See gotwarlost/istanbul#90 for reasoning
* Fixed css handler deadlock. * Fix test command to also work on Windows, see gotwarlost/istanbul#90 (comment) * Updated test
I'm on Windows 8.
I have a spec folder containing a single test file, and when I run:
istanbul cover _mocha -- -R spec
Inside that folder, I get:
The text was updated successfully, but these errors were encountered: