lundi 27 avril 2020

Mocha tests and require cache issues

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.

Aucun commentaire:

Enregistrer un commentaire