Packages

jest-mock

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

Upgrading jest-mock From 27.2.4 to 27.5.1

8 releases in betweenevery note read

Other targets from 27.2.4Latest30.5.2

Before you upgrade

Tick each one off as you go
  • Deprecated27.2.5

Release by release

  1. 27.5.1

    8 Feb 20223 new · 3 fixes
    • New

      jest-config: Support comments in JSON config file

    • New

      pretty-format: Expose ConvertAnsi plugin

    • New

      expect: Add type definitions for asymmetric closeTo matcher

    • Fixed

      jest-cli: Load binary via exported API

    • Fixed

      jest-config: Replace jsonlint with parse-json

    • Fixed

      jest-repl: Make module importable (#12311 & #12315)

  2. 27.5.0

    5 Feb 20226 new · 3 fixes
    • New

      expect: Add asymmetric matcher expect.closeTo

    • New

      jest-mock: Added mockFn.mock.lastCall to retrieve last argument

    • New

      expect: Add a fix for .toHaveProperty('')

    • New

      @jest/globals: Add missing options argument to jest.doMock typing

  3. 27.4.6

    4 Jan 20223 new · 1 fix
    • New

      jest-environment-node: Add AbortSignal

    • New

      jest-environment-node: Add Missing node global performance

    • New

      jest-config perf: only register ts-node once when loading TS config files

    • Fixed

      jest-runtime: Handle missing mocked property

  4. 27.4.2

    30 Nov 20211 new
    • New

      jest-worker: Add additional execArgv to filter

  5. 27.4.1

    30 Nov 20211 fix
    • Fixed

      jest-worker: Filter execArgv correctly

  6. 27.4.0

    29 Nov 20216 new · 7 fixes
    • New

      expect: Enhancing the toHaveProperty matcher to support array selection

    • New

      jest-core: Add support for testResultsProcessor written in ESM

    • New

      jest-diff, pretty-format: Add compareKeys option for custom sorting of object keys

    • New

      jest-mock: Add ts-jest mock util functions

  7. 27.3.0

    17 Oct 20212 new · 3 fixes
    • New

      jest-config: Add testEnvironmentOptions.html to apply to jsdom input

    • New

      jest-resolver: Support default export (.) in exports field if main is missing

    • Fixed

      expect: Tweak and improve types

    • Fixed

      jest-runtime: Ensure absolute paths can be resolved within test modules

    • Fixed

      jest-runtime: Fix instanceof for ModernFakeTimers and LegacyFakeTimers methods

  8. 27.2.5

    Deprecation8 Oct 20211 new · 6 fixes
    • Deprecated

      @jest/types: Mark deprecated configuration options as @deprecated

    • New

      jest-config: Warn when multiple Jest configs are located

    • Fixed

      expect: Pass matcher context to asymmetric matchers (#11926 & #11930)

    • Fixed

      expect: Improve TypeScript types

8 internal lines (docs, tests, tooling) left out.

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.