-
-
Notifications
You must be signed in to change notification settings - Fork 1
[Snyk] Security upgrade jest from 26.6.3 to 27.0.0 #459
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -40,7 +40,7 @@ | |||||
| "@typescript-eslint/eslint-plugin": "^4.33.0", | ||||||
| "@typescript-eslint/parser": "^4.31.1", | ||||||
| "eslint": "^7.5.0", | ||||||
| "jest": "^26.6.3", | ||||||
| "jest": "^27.0.0", | ||||||
| "standard-version": "^9.1.0", | ||||||
| "ts-jest": "^26.4.4", | ||||||
|
||||||
| "ts-jest": "^26.4.4", | |
| "ts-jest": "^27.0.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.
Upgrading Jest to v27 is a major version bump with breaking changes that will likely break your test suite with the current configuration.
ts-jestIncompatibility: Your currentts-jestversion (^26.4.4on line 45) is not compatible with Jest 27. You must also upgradets-jestto a compatible version (e.g.,^27.0.0) in thispackage.jsonfile.testEnvironmentChange: Jest 27 changed the defaulttestEnvironmentfrom'jsdom'to'node'. Given that your Jest configuration (jest.config.js) includestsxandjsxfile extensions, your tests probably rely on a browser environment. You should explicitly settestEnvironment: 'jsdom'in yourjest.config.jsto avoid test failures.Example for
jest.config.js:Without these changes, this upgrade is incomplete and will likely fail your CI build.