-
-
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
Fix ability to transform dependencies required from globalSetup script #8143
Conversation
1c51f05
to
d9f9018
Compare
If someone removes |
3037156
to
579c5b1
Compare
I made a few changes following comments and after looking at #7562
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like how this turned out, thanks!
Could you rebase on master and fix the linting error? |
…in global setup script
579c5b1
to
d5eb488
Compare
Codecov Report
@@ Coverage Diff @@
## master #8143 +/- ##
==========================================
- Coverage 62.28% 62.24% -0.05%
==========================================
Files 265 265
Lines 10440 10448 +8
Branches 2538 2540 +2
==========================================
Hits 6503 6503
- Misses 3352 3360 +8
Partials 585 585
Continue to review full report at Codecov.
|
Thanks! |
For your info, I just /Users/mark/gitforks/jest/e2e/global-setup-node-modules/setup.js
7:21 error Unable to resolve path to module './node_modules/example' import/no-unresolved |
Bah. @Volune wanna send a PR fixing our script in |
I can have a look tomorrow (I don't have my dev environment now) Suggestions welcome, I'm thinking:
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Jest failed to run globalSetup script if it loads esm dependencies from
node_modules
, even with thetransformIgnorePatterns
configuration. (For exampletransformIgnorePatterns: [ 'node_modules/(?!(?:lodash-es)/)' ]
)This is caused by
pirates
ignoringnode_modules
by default.This PR disables this behavior, which is redundant with
transformIgnorePatterns
.Test plan
Added a test in
globalSetup.test.js