This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
...ra-toolkit-docs/src/terra-dev-site/tool/jest-config-terra/UpgradeGuide.tool.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
# Jest Config Terra Upgrade Guide | ||
|
||
## Changes from 1.0 to 2.0 | ||
## Upgrading from v2 to v3 | ||
|
||
`jest-config-terra` now uses Jest 27. Consumers will need to make the following updates in order to consume `[email protected]`: | ||
jest-config-terra v3 utilizes Jest 29. The following updates will be needed in order to consume `jest-config-terra@3`: | ||
|
||
- Update to Node 14. | ||
- Regenerate all Jest snapshots. | ||
|
||
If there are any additional test failures, please refer to the Jest upgrade guides to see what additional changes may be needed: | ||
- [Jest 27 to 28 upgrade guide](https://jest-archive-august-2023.netlify.app/docs/28.x/upgrading-to-jest28/) | ||
- [Jest 28 to 29 upgrade guide](https://jestjs.io/docs/upgrading-to-jest29) | ||
|
||
Note: If upgrading from `jest-config-terra@1`, then it may be helpful to interatively upgrade to 2 than 3. | ||
|
||
## Upgrading from v1 to v2 | ||
|
||
`jest-config-terra` uses Jest 27 in v2. The following updates will be needed in order to consume `jest-config-terra@2`: | ||
|
||
- Update Jest and related Jest packages (i.e. `babel-jest`, `jest-mock`, etc.) to v27. | ||
- Tests utilizing fake timers may fail and need to be updated per the [Jest docs](https://jestjs.io/docs/timer-mocks#enable-fake-timers). | ||
- Tests utilizing fake timers may fail and need to be updated per the [Jest docs](https://jestjs.io/docs/timer-mocks#enable-fake-timers). | ||
|
||
Refer to the [Jest 27 upgrade guide](https://jestjs.io/blog/2021/05/25/jest-27) for any additional changes. |