Skip to content

build(deps): update dependency jest-when to v4 - #772

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/jest-when-4.x
Open

build(deps): update dependency jest-when to v4#772
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/jest-when-4.x

Conversation

@renovate

@renovate renovate Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
jest-when 3.7.04.0.3 age confidence

Release Notes

timkindberg/jest-when (jest-when)

v4.0.3

Compare Source

Fixes
  • Restore pre-v4 behavior where .defaultImplementation() (and aliases .defaultReturnValue() / .defaultResolvedValue() / .defaultRejectedValue()) no longer silently drops prior bare .calledWith() / .calledWith(undefined, ...) registrations. Regression introduced in the v4 TypeScript port (#​111) and fixed by restoring the NO_CALLED_WITH_YET symbol sentinel. Thanks @​rbnayax. (#​115, #​116)

v4.0.2

Compare Source

v4.0.1

Compare Source

v4.0.0: 4.0.0

Compare Source

Highlights

  • jest-when is now authored in TypeScript
  • fixes a number of long-standing typing issues, especially around wrapper mocks, calledWith inference, and void / Promise<void> cases
  • compatibility is now verified in both Jest 29 and Jest 27 environments

What changed

Native TypeScript source

The library source has been migrated from JavaScript to TypeScript, with the public type contract now tested directly in the repo.

Stronger, more accurate typings

This release tightens a number of important typing behaviors:

  • calledWith / expectCalledWith preserve argument tuple types again
  • mockReturnValue / mockResolvedValue / related methods track the mocked function's return type much more accurately
  • void / Promise<void> cases allow omitted values correctly
  • better support for function-like wrapper mocks, including jest-mock-extended-style mocked object methods
  • typed casts, mocked module functions, spies, optional args, rest args, allArgs, and matcher cases are now covered by contract tests
Compatibility guardrails

The repo now has:

  • a primary Jest 29 development environment
  • a dedicated compat/jest27 workspace

The full build, runtime tests, and type tests run in both environments. This was added specifically to avoid fixing newer Jest/mock ecosystems while regressing older supported ones.

Breaking changes

  • minimum supported Jest version is now 27
  • TypeScript usages that previously compiled because the old typings were too loose may now fail typechecking

There are no intentional runtime API changes in this release.

Thanks

Thanks to @​tlevesque-ueat for the repros, patience, and repeated validation while this got sorted out.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.64%. Comparing base (2629aa7) to head (1d4a4ec).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #772   +/-   ##
=======================================
  Coverage   69.64%   69.64%           
=======================================
  Files          11       11           
  Lines         313      313           
  Branches       58       58           
=======================================
  Hits          218      218           
  Misses         82       82           
  Partials       13       13           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch 2 times, most recently from c8640cc to ac5251c Compare March 27, 2026 12:40
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch from ac5251c to dc7d59b Compare April 16, 2026 11:08
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch from dc7d59b to 4af05cd Compare April 27, 2026 01:45
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch 2 times, most recently from 64aaba0 to cf45868 Compare May 18, 2026 10:07
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch 2 times, most recently from 92fc977 to a70b697 Compare June 1, 2026 17:39
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch from a70b697 to fbdd03d Compare June 11, 2026 14:55
@renovate
renovate Bot force-pushed the renovate/jest-when-4.x branch from fbdd03d to 1d4a4ec Compare July 12, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants