I have the following folder structure:
- app
- lambda
- users
- handler.js
- companies
- handler.js
- users
- lambda
- tests
- mocha.opts
- package.lock.json
- package.json
- lambda
- users
- handler.test.js
- helper.js
- companies
- handler.test.js
- fixture.js
- users
When I run the 'npm test' from the following location
C:\myproject\tests> npm test
I get the following warning because it cannot find the tests to be run.
Warning: Could not find any test files matching pattern: test
No test files found
npm ERR! Test failed. See above for more details.
How can I configure it to tell Mocha to run only all my 'handler.test.js' files?
I have this on my package.json
"scripts": { "test": "mocha './lambda/**/*.test.js'"} I would expect that to work, but it is not finding the tests files.