Packages

jest-util

30.5.1 · 1 Sep 2026MIT156.2M / weekRepositoryHomepagenpmAtom feed

Your version

29.1.0

28 Sep 2022Where it was published

29.7.0 is the newest release of 29.x.

In short

7 new7 fixed

Release note

Features

  • expect, @jest/expect: Support type inference for function parameters in CalledWith assertions

  • expect, @jest/expect: Infer type of *ReturnedWith matchers argument

  • @jest/environment, jest-runtime: Allow jest.requireActual and jest.requireMock to take a type argument

  • @jest/environment: Allow jest.mock and jest.doMock to take a type argument

  • @jest/fake-timers: Add jest.now() to return the current fake clock time (#13244, #13246)

  • @jest/mock: Add withImplementation method for temporarily overriding a mock

  • expect: Export toThrow* matchers

Fixes

  • jest-circus, jest-jasmine2: Fix error messages for Node's assert.throes

  • jest-haste-map: Remove __proto__ usage

  • jest-mock: Improve spyOn typings to handle optional properties

  • jest-mock: Fix mocking of getters and setters on classes

  • jest-snapshot: Throw useful error when an array is passed as property matchers

  • jest-snapshot: Prioritize parser used in the project

  • jest-transform: Attempt to work around issues with atomic writes on Windows