I have placed my webpack entry for tests under src/. Then inside the entry I have the following to find and run all *.spec.js files inside src directory:
var testsContext = require.context('.', true, /.+\.spec\.js?$/);
testsContext.keys().forEach(testsContext);
When I run npm test, it runs all my tests successfully, however it keeps giving me this annoying warning:
WARNING in ./src .+\.spec\.js?$
Module not found: Error: a dependency to an entry point is not allowed
@ ./src .+\.spec\.js?$
Anyone else faced the same issue?
Aucun commentaire:
Enregistrer un commentaire