I'm trying to somewhat separate my tests into unit
, integration
and qa_requires
folders. So I though of this structure:
| /app
| | ...
| /tests
| | unit\
| | | file1.js
| | | file2.js
| | integration\
| | | file1.js
| | | file2.js
| | qa_requires\
| | | file1.js
| | | file2.js
AFAIK, there's a caching mechanism in node to handle requires as read here but, the files are in different folders and I can't tell what I'm doing wrong for node to avoid requiring all tests.
Question: Why if I test all files under /tests with a mocha call without arguments (node_modules/.bin/mocha
) it finds /test/unit/file1.js
and /tests/integration/file2.js
and nothing more?