-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest ignoring tests inside src/node_modules #1042
Comments
i suspect this is expected behavior, since 'node_modules' is actually one of the folders jest is configured to ignore since
|
It makes sense if this is intended behavior, but to be clear, the |
there is however another |
Just submitted a PR so that we can do |
Let's do this (support for |
#544 should take care of supporting this case |
I have a similar issue. I'm attempting to run jest from inside the
I'm able to run tests after I move |
I think one key thing to keep in mind is that whenever there is a node_modules folder without a package.json at the same-level, it is most likely user-generated. At our organization, the "top-level" of our git package source is located under a src/ directory during our build process, so this would break testing during the build phase since the third-party node_modules would also be installed under this src/ directory from package.json at that same level. |
Closing in favor of #1333. We'll likely support Yarn Workspaces and/or Lerna with a top-level |
I created a
src/node_modules
directory so I can haveshared
code I re-use throughout my project.So rather than doing
I could write
This works great, except when I add a test
MyComponent.test.js
. It isn't "seen" by Jest.Not sure if this is a supported use case, it might just be a nice-to-have.
The text was updated successfully, but these errors were encountered: