Packages

@jest/types

30.5.1 · 1 Sep 2026MIT190.3M / weekRepositoryHomepagenpmAtom feed

Your version

29.0.0

major25 Aug 2022Where it was published

29.6.3 is the newest release of 29.x.

In short

11 breaking4 new7 fixed4 internal

  • breaking

    expect: Differentiate between MatcherContext MatcherUtils and MatcherState types

  • breaking

    jest-config: Make snapshotFormat default to escapeString: false and printBasicPrototype: false

  • breaking

    jest-config: Remove undocumented collectCoverageOnlyFrom option

  • breaking

    jest-environment-jsdom: Upgrade to jsdom@20 (#13037, #13058)

  • breaking

    jest-mock: Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)

  • breaking

    jest-mock: Change the default jest.mocked helper’s behavior to deep mocked

  • breaking

    jest-snapshot: Let babel find config when updating inline snapshots

  • breaking

    @jest/test-result, @jest/types: Replace Bytes and Milliseconds types with number

Release note

Blog post: jestjs.io/blog/2022/08/25/jest-29

Features

  • breaking

    expect: Differentiate between MatcherContext MatcherUtils and MatcherState types

  • jest-circus: Add support for test.failing.each

  • breaking

    jest-config: Make snapshotFormat default to escapeString: false and printBasicPrototype: false

  • breaking

    jest-config: Remove undocumented collectCoverageOnlyFrom option

  • breaking

    jest-environment-jsdom: Upgrade to jsdom@20 (#13037, #13058)

  • @jest/globals: Add jest.Mocked, jest.MockedClass, jest.MockedFunction and jest.MockedObject utility types

  • breaking

    jest-mock: Refactor Mocked* utility types. MaybeMockedDeep and MaybeMocked became Mocked and MockedShallow respectively; only deep mocked variants of MockedClass, MockedFunction and MockedObject are exported (#13123, #13124)

  • breaking

    jest-mock: Change the default jest.mocked helper’s behavior to deep mocked

  • breaking

    jest-snapshot: Let babel find config when updating inline snapshots

  • breaking

    @jest/test-result, @jest/types: Replace Bytes and Milliseconds types with number

  • jest-worker: Adds workerIdleMemoryLimit option which is used as a check for worker memory leaks >= Node 16.11.0 and recycles child workers as required (#13056, #13105, #13106, #13107)

  • breaking

    pretty-format: Remove ConvertAnsi plugin in favour of jest-serializer-ansi-escapes

  • pretty-format: Allow to opt out from sorting object keys with compareKeys: null

Fixes

  • jest-config: Fix testing multiple projects with TypeScript config files

  • @jest/expect-utils: Fix deep equality of ImmutableJS Record

  • jest-haste-map: Increase the maximum possible file size that jest-haste-map can handle

  • jest-runtime: Properly support CJS re-exports from dual packages

  • jest-snapshot: Make prettierPath optional in SnapshotState

  • jest-snapshot: Fix parsing error from inline snapshot files with JSX

  • jest-worker: When a process runs out of memory worker exits correctly and doesn't spin indefinitely

Chore & Maintenance

  • breaking

    *: Drop support for Node v12 and v17

  • breaking

    jest-snapshot: Require rootDir as argument to SnapshotState