Closed alexanderchan closed 8 years ago
@alexanderchan I'd like to do this but now I'm not quite sure the right way to do it. The problem is kind of nuanced...
These enzyme-example-*
projects are being used in the main enzyme
repo to run the test suite. It runs the main enzyme
suite, then cd
s into this repo's directory inside of node_modules
and runs npm install && npm test
.
The problem I was running into was that since the project folder in this case was now located inside of a higher up node_modules
directory, webpack was ignoring every file. Any ideas on how to prevent node_modules
in a more robust way that would still work in this (admittedly strange) test situation?
@lelandrichardson, interesting case. I've updated this to exclude by path instead of regexp and it works for me when I npm run test:env -- karma-webpack
from enzyme. imho it still looks like a normal webpack config so that's a bonus :smile:
I've also removed the webpack require, sorry I must have brought that in for another test I was doing and didn't remove it.
Awesome. Looks great! Thanks for fixing that for me :)
Chai will complain if node_modules is included due to strict mode being applied. Also, excluding speeds the build time.