Closed Aarbel closed 4 years ago
Sorry for this super-late answer. This issue has been fixed via this PR https://github.com/ForestAdmin/forest-express/pull/325 thanks to @jdbdnz. You will have to update to the latest version. See: https://github.com/ForestAdmin/forest-express/blob/master/CHANGELOG.md#fixed-1
Initialization - Filter out test files when requiring models (tests/, .spec.js, .spec.ts, .test.js or *.test.ts).
Side note: Still, since ./old
is not a common pattern, it will still be not ignored via our script. You could for instance move out your old
repository to the root level and rename it "models-old".
Let me close this ticket, feel free to reopen it if you are still facing this issue!
In my
/models
folder i haveMODEL.test.js
files and also an./old/
folder for old models.On Express App start, i've got this ForestAdmin error :
ReferenceError: describe is not defined
, which is obviously a MochaJS error. All works fine when i remove all the test files from the/models
folder.How could i make ForestAdmin ignore these test files and this folder ?
Thanks a lot for your help !