In my package.json
, I have a scripts block that uses **/*Test.js
to match files. When run via npm
, they do not match sub-directories m
You can inline the find
command with the -name
option in your scripts to replace the extended globbing syntax provided by zsh.
In your case, the command would be:
mocha `find dist -type f -name '*Test.js'`
You can realistically omit the -type f
part if you're confident that you won't ever put "Test.js" in a directory name. (A safe assumption, most likely, but I included it for completeness sake)