Open i5ting opened 3 years ago
Apparently, there is a bug envolving dependencies when Jest is used with requireDir, check this thread, this comment in specific, recomends switching requireDir package for require-directory package.
The module require-directory works just fine for me along side Jest.
For me, what would be writed as:
const routesDefinition = requireDir("./routes");
was replaced by:
const routesDefinition = requireDirectory(module, "./routes");
https://github.com/aseemk/requireDir/blob/master/index.js#L50