Migrating to Jest v30.0.0-alpha.7
Version v30.0.0-alpha.7 introduces 2 breaking changes. This guide details how to update your code.
Released: 1/30/2025
2
Breaking Changes
3
Migration Steps
3
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
@jest/fake-timerstestFailureExitCodeexitBreaking Changes
●Issue #1
Upgrade @sinonjs/fake-timers to v13 in @jest/fake-timers, which may break existing timer mocks. Update code to the new API.
●Issue #2
Change the type of the `testFailureExitCode` config option in jest-schemas/jest-types, which may break configs expecting the old type. Adjust config to use the new type.
Migration Steps
- 1Review any usage of @sinonjs/fake-timers APIs and adapt them to the v13 changes.
- 2Update `testFailureExitCode` values in Jest configuration to match the new type.
- 3Replace imports or calls to `exit` with `exit-x` as per the new implementation.
Release Summary
Jest v30.0.0-alpha.7 adds new CLI and runtime features, upgrades key dependencies, and includes several bug fixes, while also introducing breaking changes to fake‑timer handling and config option types.
Need More Details?
View the full release notes and all changes for Jest v30.0.0-alpha.7.
View Full Changelog