Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make it possible to call through to underlying stub in stub instance #2503

Merged
merged 4 commits into from Mar 26, 2023

Conversation

fatso83
Copy link
Contributor

@fatso83 fatso83 commented Mar 24, 2023

Purpose (TL;DR) - mandatory

A bug was introduced in #2477 that surfaced as #2501: it was impossible to call through to the underlying prototype's method when introducing no-ops. This fix moves the adding of no-ops to the restore phase, avoiding the issue.

How to verify - mandatory

Run the test suite 😄

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (6e19746) 95.96% compared to head (c8e5b37) 95.99%.

❗ Current head c8e5b37 differs from pull request most recent head eb02fb6. Consider uploading reports for the commit eb02fb6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2503      +/-   ##
==========================================
+ Coverage   95.96%   95.99%   +0.02%     
==========================================
  Files          38       40       +2     
  Lines        1883     1897      +14     
==========================================
+ Hits         1807     1821      +14     
  Misses         76       76              
Flag Coverage Δ
unit 95.99% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/sinon/create-stub-instance.js 100.00% <100.00%> (ø)
lib/sinon/sandbox.js 97.74% <100.00%> (+0.01%) ⬆️
lib/sinon/stub.js 95.19% <100.00%> (-0.54%) ⬇️
lib/sinon/util/core/sinon-type.js 100.00% <100.00%> (ø)
lib/sinon/util/core/wrap-method.js 82.17% <100.00%> (+0.73%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@fatso83 fatso83 force-pushed the issue-2501 branch 2 times, most recently from d523ef1 to 50a241c Compare March 26, 2023 10:46
@fatso83 fatso83 merged commit 477064b into main Mar 26, 2023
8 checks passed
@fatso83 fatso83 deleted the issue-2501 branch March 26, 2023 10:50
fatso83 added a commit that referenced this pull request Mar 27, 2023
Omission from development :-/

refs #2501
refs #2503
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.

None yet

1 participant