When running npm test
, which is defined by:
"test": "mocha test/**/*.spec.js"
The path expansion fails to match scripts at a depth of more than one. Therefore everything in test/lib/*.spec.js
gets matched, but a test at test/lib/subdir/*.spec.js
does not.
When I run mocha test/**/*.spec.js
, however, all the tests are matched and run. I'm at something of a loss as to how to debug this.
EDIT
I'm pretty sure this is due to npm
running scripts in sh
instead of my shell (zsh
). I don't know how to fix this.