Packages

jest-mock

30.5.2 · 18 Sep 2026MIT94.8M / weekRepositoryHomepagenpmAtom feed

Your version

29.4.3

15 Feb 2023Where it was published

29.7.0 is the newest release of 29.x.

In short

4 new4 fixed

Release note

Features

  • expect: Update toThrow() to be able to use error causes

  • jest-core: Allow to use workerIdleMemoryLimit with only 1 worker or runInBand option

  • jest-message-util: Add support for error causes (#13868 & #13912)

  • jest-runtime: Revert import assertions for JSON modules as it's been relegated to Stage 2

Fixes

  • @jest/expect-utils: subsetEquality should consider also an object's inherited string keys

  • jest-mock: Clear mock state when jest.restoreAllMocks() is called

  • jest-mock: Prevent mockImplementationOnce and mockReturnValueOnce bleeding into withImplementation

  • jest-mock: Do not restore mocks when jest.resetAllMocks() is called

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.