Change8

Jest

Dev Tools

Delightful JavaScript Testing.

Latest: v30.2.011 releases3 breaking changes4 common errorsView on GitHub

Release History

v30.2.02 fixes1 feature
Sep 28, 2025

Jest adds JSDOM v27 support and includes bug fixes such as exporting the TransformerConfig interface and improving TS loader handling in jest.config.ts.

v30.1.31 fix
Sep 3, 2025

This release fixes the unstable_mockModule handling of node-prefixed core modules.

v30.1.21 fix
Sep 3, 2025

Fixed snapshot header regexp in jest-snapshot-utils to work with newline characters across OSes.

v30.1.11 fix
Aug 27, 2025

This release fixes a deprecated goo.gl snapshot warning issue on Windows.

v30.1.04 fixes3 features
Aug 27, 2025

This release adds configurable GC aggressiveness, reduces redundant ReferenceError messages, improves failure reporting for onlyFailures mode, and fixes several snapshot, concurrency, and import path issues.

v30.0.22 fixes
Jun 19, 2025

This patch release fixes two issues: it hardens deepCyclicCopyObject in jest-matcher-utils and makes the garbage collection protection property writable.

v30.0.12 fixes1 feature
Jun 18, 2025

This release adds the new `defaultAsyncResolver`, fixes builtin module resolution and globals cleanup handling, and deprecates the `jest-repl` package.

v30.0.0Breaking1 fix33 features
Jun 10, 2025

Jest 30 is a substantial major release after a three-year gap, introducing numerous features like new matchers, improved configuration loading for TypeScript modules (mts/cts), and significant internal upgrades to JSDOM and fake timers. Users must consult the migration guide due to several breaking API changes.

v30.0.0-beta.41 feature
May 27, 2025

Jest v30.0.0-beta.4 introduces a runtime improvement by switching to `compileFunction` over `new Script`.

v30.0.0-beta.3Breaking11 fixes1 feature
May 27, 2025

Jest 30 drops Node 16 support, updates jsdom to v26, mitigates memory leaks, and introduces a new ArrayOf matcher while fixing numerous bugs.

v30.0.0-alpha.7Breaking4 fixes5 features
Jan 30, 2025

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.

Common Errors

ValueHavingError2 reports

The "ValueHavingError" error in Jest often arises when comparing error objects, particularly when the error's properties like `cause` (or other custom properties) are not directly comparable using Jest's default equality checks. To fix this, use `.toThrowError(Error)` or `.toThrow(Error)` to check the error type, and then assert on specific error properties (like `cause`, `message`, or custom properties) using `.expect(thrownError.cause).toBe(...)` or `.expect(thrownError.message).toContain(...)` for a more granular comparison. Alternatively, consider writing a custom matcher for more complex error comparisons if needed.

JestAssertionError2 reports

JestAssertionError usually arises from mismatches between expected and actual outcomes in Jest's `expect` assertions, particularly when custom error classes or the `Error#cause` property are involved. To fix it, ensure your assertions accurately reflect the error message or properties being tested, and consider explicitly checking the `Error#cause` if it's relevant to your test's expectations by accessing the `cause` property of the error. If you are using custom error classes, export JestAssertionError from expect so that it can be extended.

IllegalArgumentException1 report

The "IllegalArgumentException" in Jest coverage often arises from incorrect or circular references within your code, especially in complex class structures or when using decorators. Review your code for circular dependencies, incorrect class inheritance, or improperly used decorators, and refactor to eliminate these problematic references to ensure Jest can correctly traverse and analyze your codebase. Specifically, pay close attention to how classes are imported and extended, and simplify circular dependency chains.

AggregateError1 report

AggregateError in Jest usually indicates multiple unhandled promise rejections or exceptions occurring concurrently within a test case or test suite. To fix it, ensure all promises have proper `.catch()` handlers or use `try...catch` blocks around asynchronous operations, and verify that `async` functions always handle potential errors to prevent uncaught exceptions from propagating up and being aggregated.

Related Dev Tools Packages

Subscribe to Updates

Get notified when new versions are released

RSS Feed