Closed vboulaye closed 5 years ago
It's not npm-run-all, it's your glob pattern. **/*.test.js
matches every .test.js
file in your node_modules
directory – and npm-run-all depends on memorystream, which has a file named memorystream.test.js
.
If that doesn't fix it try using _mocha
CLI (part of Mocha package). IIRC it runs better in automation.
I did not know that the glob pattern applied to the node_modules
directory too!
(I also changed the executable to _mocha
, but changing the pattern to src/**/*.test.js
did fix the issue)
Thanks a lot.
@vboulaye https://globster.xyz/ -- for testing globs
Hello,
I am working on a test project with the default svelte template that uses npm-run-all.
I encountered a strange issue when adding mocha+chai to the package.json. It fails when running tests using
npm test
withError: Cannot find module 'expect.js'
Removing the npm-run-all dependency makes the problem disappear (mocha and chai are installed).
I made a small project to reproduce it: https://github.com/vboulaye/npm-run-all-test
The full error stack is the following: