Packages

@jest/expect

30.5.2 · 18 Sep 2026MIT58.3M / weekRepositoryHomepagenpmAtom feed

Your version

46 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 30.x · latest line
  2. 30.5.2

    18 Sep 2026
    • @jest/transform: Strip TypeScript types with Node when no transformer claims a .ts, .mts or .cts file

    • jest-core, jest-haste-map, jest-transform: Keep require('../package.json') external when bundling, so jest --version and the transform and haste-map cache keys report the released version instead of the previous one

    • jest-each: Escape a table row's keys before building the $variable interpolation RegExp, so a column name such as count(*) no longer fails the whole table with Invalid regular expression, and a . or | in a column name is matched literally

  3. 30.5.1

    1 Sep 2026
    • jest-config: Don't warn about global-only options in the config that supplies the global config - the root config a project resolves to, or the first entry of --projects when no root config is passed

    • jest-config, jest-types: Stop accepting reporters, coverageReporters, workerIdleMemoryLimit, cwd and runnerOptions in a project config - they were silently ignored, and now warn like the other global-only options

    • jest-config, jest-validate: Warn about maxWorkers and coverageThreshold in a project config instead of dropping them without a word

  4. 30.5.0

    28 Aug 2026
    • breaking

      jest-haste-map: Match watched files on a full extension, so moduleFileExtensions: ['js'] no longer accepts foo.mjs

    • deprecated

      @jest/source-map: Deprecate getCallsite in favour of SourceMapSupport#getCallsite

    • babel-plugin-istanbul is updated to v8

  5. 30.4.1

    8 May 2026
    • [jest-config, jest-core, jest-runner, jest-schemas, jest-types] Allow custom runner configuration options via tuple format ['runner-path', {options}]

    • jest-runtime: Align CJS-from-ESM default export with Node: module.exports is always the ESM default, __esModule unwrapping is no longer applied

  6. 30.4.0

    7 May 2026
    • babel-jest: Support collecting coverage from .mts, .cts (and other) files

    • [jest-circus, jest-cli, jest-config, jest-core, jest-jasmine2, jest-types] Add --collect-tests flag to discover and list tests without executing them

    • jest-config, jest-runner, jest-worker: Add workerGracefulExitTimeout config option to control how long workers are given to exit before being force-killed

  7. 30.3.0

    10 Mar 2026
    • jest-config: Add defineConfig and mergeConfig helpers for type-safe Jest config

    • jest-fake-timers: Add setTimerTickMode to configure how timers advance

    • *: Reduce token usage when run through LLMs

  8. 30.2.0

    28 Sep 2025
    • jest-environment-jsdom-abstract: Add support for JSDOM v27

    • babel-jest: Export the TransformerConfig interface

    • jest-config: Fix jest.config.ts with TS loader specified in docblock pragma

  9. 30.1.2

    1 Sep 2025
    • jest-snapshot-utils: Correct snapshot header regexp to work with newline across OSes

  10. 30.1.1

    27 Aug 2025
    • jest-snapshot-utils: Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences

  11. 30.1.0

    27 Aug 2025
    • jest-leak-detector: Configurable GC aggressiveness regarding to V8 heap snapshot generation

    • jest-runtime: Reduce redundant ReferenceError messages

    • jest-core: Include test modules that failed to load when --onlyFailures is active

  12. 30.0.5

    22 Jul 2025
    • jest-config: Allow testMatch to take a string value

    • jest-worker: Let workerIdleMemoryLimit accept 0 to always restart worker child processes

    • expect: Fix bigint error

  13. 30.0.4

    2 Jul 2025
    • expect: The Inverse type is now exported

    • expect: Support async functions in toBe

    • jest: Jest --onlyFailures --listTests now correctly lists only failed tests

  14. 30.0.3

    25 Jun 2025
    • jest-config: Fix ESM TS config loading in a CJS project

    • jest-core: Jest --onlyFailures --listTests now correctly lists only failed tests

    • jest-diff: Show non-printable control characters to diffs

  15. 30.0.2

    19 Jun 2025
    • jest-matcher-utils: Make 'deepCyclicCopyObject' safer by setting descriptors to a null-prototype object

    • jest-util: Make garbage collection protection property writable

  16. 30.0.1

    18 Jun 2025
    • deprecated

      *: Remove and deprecate jest-repl package

    • jest-resolver: Implement the defaultAsyncResolver

    • jest-resolver: Resolve builtin modules correctly

  17. 30.0.0

    10 Jun 2025
    • breaking

      jest-config: Add mts and cts to default moduleFileExtensions config

    • breaking

      jest-config: Update testMatch and testRegex default option for supporting mjs, cjs, mts, and cts

    • breaking

      @jest/core: Changed --filter to accept an object with shape { filtered: Array<string> } to match documentation

  18. 29.x
  19. 29.7.0

    12 Sep 2023
    • create-jest: Add npm init / yarn create initialiser for Jest projects

    • jest-validate: Allow deprecation warnings for unknown options

    • jest-resolver: Replace unmatched capture groups in moduleNameMapper with empty string instead of undefined

  20. 29.6.4

    24 Aug 2023
    • jest-environment-node: Make sure atob and btoa are writeable in Node 20

    • jest-worker: Additional error wrapper for parentPort.postMessage to fix unhandled DataCloneError.

  21. 29.6.3

    21 Aug 2023
    • breaking

      jest-mock: Revert #13692 as it was a breaking change

    • breaking

      jest-mock: Revert #13866 as it was a breaking change

    • breaking

      jest-mock: Revert #13867 as it was a breaking change

  22. 29.6.2

    27 Jul 2023
    • jest-circus: Fix snapshot matchers in concurrent tests when nr of tests exceeds maxConcurrency

    • @jest/core: When running global setup and teardown, do not try to change the message property of the thrown error object when the message property is unwritable

    • jest-snapshot: Move @types/prettier from dependencies to devDependencies

  23. 29.6.1

    6 Jul 2023
    • breaking

      jest-circus: Revert #14110 as it was a breaking change

  24. 29.6.0

    4 Jul 2023
    • security

      *: Update semver dependency to get vulnerability fix

    • jest-circus, jest-snapshot: Add support for snapshot matchers in concurrent tests

    • jest-cli: Include type definitions to generated config files

  25. 29.5.0

    6 Mar 2023
    • jest-changed-files: Support Sapling

    • jest-circus, @jest/cli, jest-config: Add feature to randomize order of tests via CLI flag or through the config file

    • [jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types] Add workerThreads configuration option to allow using worker threads for parallelization

  26. 29.4.3

    15 Feb 2023
    • 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)

  27. 29.4.2

    7 Feb 2023
    • @jest/core: Instrument significant lifecycle events with performance.mark()

    • expect, @jest/expect: Provide type of actual as a generic argument to Matchers to allow better-typed extensions

    • jest-circus: Added explicit mention of test failing because done() is not being called in error message

  28. 29.4.1

    26 Jan 2023
    • expect, jest-circus, @jest/types: Implement numPassingAsserts of testResults to track the number of passing asserts in a test

    • jest-core: Add newlines to JSON output

    • @jest/reporters: Automatic log folding in GitHub Actions Reporter

  29. 29.4.0

    24 Jan 2023
    • expect, @jest/expect-utils: Support custom equality testers

    • jest-config, jest-worker: Use os.availableParallelism if available to calculate number of workers to spawn

    • @jest/globals, jest-mock: Add jest.replaceProperty() that replaces property value

  30. 29.3.1

    8 Nov 2022
    • jest-config: Do not warn about preset in ProjectConfig

    • jest-transform: Defer creation of cache directory

  31. 29.3.0

    7 Nov 2022
    • jest-runtime: Support WebAssembly (Wasm) imports in ESM modules

    • jest-config: Add config validation for projects option

    • jest-mock: Treat cjs modules as objects so they can be mocked

  32. 29.2.2

    24 Oct 2022
    • @jest/test-sequencer: Make sure sharding does not produce empty groups

    • jest-circus: Test marked as todo are shown as todo when inside a focussed describe

    • jest-mock: Ensure mock resolved and rejected values are promises from correct realm

  33. 29.2.1

    18 Oct 2022
    • @jest/globals, jest-mock: Add jest.Spied* utility types

    • jest-environment-node: Make globalThis.performance writable for Node 19 and fake timers

    • jest-mock: Revert #13398 to restore mocking of setters

  34. 29.2.0

    14 Oct 2022
    • @jest/cli, jest-config: A seed for the test run will be randomly generated, or set by a CLI option

    • @jest/cli, jest-config: --show-seed will display the seed value in the report, and can be set via a CLI flag or through the config file

    • jest-config: Add readInitialConfig utility function

  35. 29.1.2

    30 Sep 2022
    • expect, @jest/expect: Revert buggy inference of argument types for *CalledWith and *ReturnedWith matchers introduced in 29.1.0

    • jest-worker: Add missing dependency on jest-util

  36. 29.1.0

    28 Sep 2022
    • 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

  37. 29.0.3

    10 Sep 2022
    • @jest/environment, jest-runtime: Allow passing a generic type argument to jest.createMockFromModule<T>() method

    • expect: Expose ExpectationResult type

    • jest-snapshot: Expose Context type

  38. 29.0.2

    3 Sep 2022
    • jest-transform: Expose TransformFactory type

    • babel-plugin-jest-hoist: Support imported jest in mock factory

    • jest-mock: Align the behavior and return type of generateFromMetadata method

  39. 29.0.1

    26 Aug 2022
    • jest-snapshot: Pass snapshotFormat through when diffing snapshots

  40. 29.0.0

    25 Aug 2022
    • 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

  41. 28.x
  42. 28.1.3

    13 Jul 2022
    • jest-leak-detector: Use native FinalizationRegistry when it exists to get rid of external C dependency

    • jest-changed-files: Fix a lock-up after repeated invocations

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

  43. 28.1.2

    29 Jun 2022
  44. 28.1.1

    7 Jun 2022
    • jest: Expose Config type

    • @jest/reporters: Improve GitHubActionsReporters annotation format

    • @jest/types: Infer argument types passed to test and describe callback functions from each tables (#12885, #12905)

  45. 28.1.0

    6 May 2022
    • jest-circus: Add failing test modifier that inverts the behaviour of tests

    • jest-environment-node, jest-environment-jsdom: Allow specifying customExportConditions

    • expect: Adjust typings of lastCalledWith, nthCalledWith, toBeCalledWith matchers to allow a case there a mock was called with no arguments

  46. 28.0.3

    29 Apr 2022
    • jest-config: Normalize reporters option defined in presets

    • @jest/reporters: Fix trailing slash in matching coverageThreshold key

    • jest-resolve: Fix (experimental) ESM module mocking for re-exports

  47. 28.0.2

    27 Apr 2022
    • jest-worker: Add JestWorkerFarm helper type

    • *: Lower Node 16 requirement to 16.10 from 16.13 due to a Node bug that causes memory and performance issues

  48. 28.0.1

    26 Apr 2022
    • removed

      jest-serializer: Remove deprecated module from source tree

    • jest-resolve: Expose ResolverOptions type

    • expect: Add missing dependency jest-util

  49. 28.0.0

    25 Apr 2022
    • breaking

      jest-cli, jest-config: Remove testURL config, use testEnvironmentOptions.url instead

    • breaking

      jest-cli: Remove undocumented --timers option

    • breaking

      jest-config: Stop shipping jest-environment-jsdom by default