Skip to content

fix(mock): re-invoke reply callback for persistent mocks - #5650

Merged
mcollina merged 1 commit into
mainfrom
fix/mock-reply-callback-persist
Aug 5, 2026
Merged

fix(mock): re-invoke reply callback for persistent mocks#5650
mcollina merged 1 commit into
mainfrom
fix/mock-reply-callback-persist

Conversation

@mcollina

@mcollina mcollina commented Aug 4, 2026

Copy link
Copy Markdown
Member

Resolve reply option callbacks without replacing mockDispatch.data, so
the callback is preserved and re-invoked for every matching request on
persistent (.persist()) or .times(n) interceptors.

Regression introduced in #5367.

Resolve reply option callbacks without replacing mockDispatch.data, so
the callback is preserved and re-invoked for every matching request on
persistent (.persist()) or .times(n) interceptors.

Regression introduced in #5367.
@codecov-commenter

codecov-commenter commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.43%. Comparing base (c8d80e6) to head (2320f5b).

Files with missing lines Patch % Lines
lib/mock/mock-utils.js 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5650      +/-   ##
==========================================
+ Coverage   93.42%   93.43%   +0.01%     
==========================================
  Files         110      110              
  Lines       38710    38711       +1     
==========================================
+ Hits        36165    36170       +5     
+ Misses       2545     2541       -4     

☔ 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.

@mcollina
mcollina merged commit 7f50f74 into main Aug 5, 2026
61 of 67 checks passed
@mcollina
mcollina deleted the fix/mock-reply-callback-persist branch August 5, 2026 07:17
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.

3 participants