I found a great answer on how to get mocha to recognize that my tests files are located in another path and to recursively traverse that path - create mocha.opts
in the ./test
folder. However, I'm having some issue with the file. Here's what I have in my mocha.opts file:
services/endpoints
--recursive
The test files themselves (200Tests.js, 400Tests.js, etc) live in various paths:
./test/services/endpoints/
|---users
|---persons
|---|---findByName
|---|---|---200Tests.js
|---|---|---400Tests.js
|---|---findById
|---|---|---200Tests.js
|---|---|---400Tests.js
etc.
From my project root, I issue mocha
from the terminal and get: Error: cannot resolve path (or pattern) 'services/endpoints'
. Am I doing something wrong or missing something?