-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Undocumented breaking change with moduleDirectories config in Jest v20 #3535
Comments
Thank you! This is actually a regression and we'll fix it in a patch release. |
Not sure if the same regression, but this also does not work anymore in v20: "testMatch": [
"<rootDir>/tests/frontend-unit/**/*Test.js"
] Problem is, without the |
We should also fix that one, yes. Thanks for mentioning it. |
Maybe it's not necessary that I mention this, but this also failed for me after upgrading to v20:
|
Fixed in the latest patch. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hey y'all, congrats on the release of v20! A lot of really great additions, as well as critical, less-flashy work refactoring for the future. Thank you for your efforts 🙏🏼
Just updated a couple projects and ran into an undocumented breaking change. It's not really an issue to fix, but I want to document it for other folks who run into it.
After upgrading from v19 to v20 I had all of my tests failing with various
Cannot find module
errors. First it was coming from a script loading polyfills so I was seeingCannot find module 'babel-polyfill' from 'polyfills.js'
, so I thought it was part of the changes to Jest no longer loadingbabel-polyfill
internally. I commented that file out though and gotCannot find module 'once' from 'queueRunner.js'
, which was definitely not in my codebase. At that point I started playing around with some config changes to see what might affect it.Turned out to be the
moduleDirectories
configuration. I've been using "<rootDir>" in each entry, which doesn't seem to be valid any longer. Once I dropped that prefix that fixed everything.The text was updated successfully, but these errors were encountered: