-
-
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: jest-util should not depend on jest-mock #4992
Conversation
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.
We're going to get rid of that module anyway, right? But until then, 👍
Should this be done as well? diff --git i/packages/jest-config/package.json w/packages/jest-config/package.json
index 2094d0ff..252b8046 100644
--- i/packages/jest-config/package.json
+++ w/packages/jest-config/package.json
@@ -10,8 +10,6 @@
"dependencies": {
"chalk": "^2.0.1",
"glob": "^7.1.1",
- "jest-environment-jsdom": "^21.2.1",
- "jest-environment-node": "^21.2.1",
"jest-get-type": "^21.2.0",
"jest-jasmine2": "^21.2.1",
"jest-regex-util": "^21.2.0",
@@ -19,5 +17,9 @@
"jest-util": "^21.2.1",
"jest-validate": "^21.2.1",
"pretty-format": "^21.2.1"
+ },
+ "devDependencies": {
+ "jest-environment-jsdom": "^21.2.1",
+ "jest-environment-node": "^21.2.1"
}
}
|
71394a1
to
22d9da0
Compare
"jest-validate": "^21.2.1", | ||
"mkdirp": "^0.5.1" | ||
}, | ||
"devDependencies": { | ||
"jest-mock": "^21.2.0" |
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.
it's imported directly in the tests
Hm, it's funny, because env is not a direct dependency for |
Yeah, Jest should come with the node and jsdom environments by default, even if only one of them is used. |
This is |
* Revert "docs: update expect.anything() example (#5007)" This reverts commit ea3fabc. * Revert "Emphasise required return (#4999)" This reverts commit 4f1113c. * Revert "Makes NPM a link like Yarn is (#4998)" This reverts commit aa4f09d. * Revert "Update Timeout error message to `jest.timeout` and display current timeout value (#4990)" This reverts commit 08f8394. * Revert "fix: jest-util should not depend on jest-mock (#4992)" This reverts commit 4e2f41f. * Revert "Update Troubleshooting.md (#4988)" This reverts commit 6414f28. * Revert "Revert "Add the Yammer logo to the 'who is using this' section of the website." (#4987)" This reverts commit 91b104f. * Revert "Make "weak" optional dependency and check it at runtime (#4984)" This reverts commit e00529d. * Revert "Re-inject native Node modules (#4970)" This reverts commit ef55e89.
Would someone please explain the fix for this? I was not clear after reading through this problem. I setup my app with
When I run First it was TypeError: environment.setup is not a function When I run,
This is my .babelrc
This is my package.json
|
No need to post in multiple threads 🙂 See answer in the other one |
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-util
should not depend onjest-mock
.Test plan
Green CI