Change8

v30.0.0-alpha.7

Breaking Changes
📦 jestView on GitHub →
2 breaking5 features🐛 4 fixes🔧 3 symbols

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.

⚠️ Breaking Changes

  • Upgrade @sinonjs/fake-timers to v13 in @jest/fake-timers, which may break existing timer mocks. Update code to the new API.
  • 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

  1. Review any usage of @sinonjs/fake-timers APIs and adapt them to the v13 changes.
  2. Update `testFailureExitCode` values in Jest configuration to match the new type.
  3. Replace imports or calls to `exit` with `exit-x` as per the new implementation.

✨ New Features

  • Export `buildArgv` from jest-cli.
  • When Node runs with type stripping enabled, jest-config no longer requires a TypeScript loader.
  • Stringify errors properly with the `--json` flag in @jest/core.
  • Add `onGenerateMock` transformer callback for auto‑generated callbacks in jest-runtime.
  • Upgrade @sinclair/typebox to v0.34 in @jest/schemas.

🐛 Bug Fixes

  • Replace `exit` with `exit-x` across the codebase.
  • Do not rely on buggy Babel behaviour in babel-plugin-jest-hoist.
  • Concurrent tests now emit jest‑circus events at the correct point and in the expected order.
  • Always load `.mjs` files with `import` in jest-util.

🔧 Affected Symbols

@jest/fake-timerstestFailureExitCodeexit