'How do I pass Mocha multiple files by path on the command line?

I am amassing a list of test files which need to be run. I'd like to pass them into Mocha via the command line. My current command looks like this:

{here}/node_modules/mocha/bin/_mocha -u tdd --timeout 999999 --colors --file {here}/tests/core/core_tests.js -R json > {here}/rpt.json

The spec for mocha says I should be able to repeat that --file pattern infinitely to load multiple files, but when I do this with even one I get this error:

Warning: Cannot find any files matching pattern "test"

This core_tests.js file, when run directly without the --file option, runs just fine.

What am I missing? How do I pass multiple files without doing it by directory?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source