sinonjs / sinon

Test spies, stubs and mocks for JavaScript.
https://sinonjs.org/
Other
9.67k stars 769 forks source link

Fix issue 2534: spies are not restored #2535

Closed fatso83 closed 1 year ago

fatso83 commented 1 year ago

Purpose (TL;DR) - mandatory

Fix issue #2534 by ensuring spies on accessors are explicitly added to the sandbox collection

Background (Problem in detail) - optional

See #2534

How to verify - mandatory

Run the tests

Checklist for author

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.26% :warning:

Comparison is base (305fb6c) 95.99% compared to head (752986e) 95.73%.

:exclamation: Current head 752986e differs from pull request most recent head 075ba36. Consider uploading reports for the commit 075ba36 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2535 +/- ## ========================================== - Coverage 95.99% 95.73% -0.26% ========================================== Files 40 40 Lines 1898 1901 +3 ========================================== - Hits 1822 1820 -2 - Misses 76 81 +5 ``` | Flag | Coverage Δ | | |---|---|---| | unit | `95.73% <100.00%> (-0.26%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/sinonjs/sinon/pull/2535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs) | Coverage Δ | | |---|---|---| | [lib/sinon/sandbox.js](https://app.codecov.io/gh/sinonjs/sinon/pull/2535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs#diff-bGliL3Npbm9uL3NhbmRib3guanM=) | `95.51% <100.00%> (-2.22%)` | :arrow_down: | | [lib/sinon/util/core/get-property-descriptor.js](https://app.codecov.io/gh/sinonjs/sinon/pull/2535?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs#diff-bGliL3Npbm9uL3V0aWwvY29yZS9nZXQtcHJvcGVydHktZGVzY3JpcHRvci5qcw==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.