Closed mroderick closed 1 year ago
Patch coverage: 100.00
% and project coverage change: -0.01
:warning:
Comparison is base (
3b41aff
) 95.99% compared to head (98cffd0
) 95.99%.:exclamation: Current head 98cffd0 differs from pull request most recent head 804d691. Consider uploading reports for the commit 804d691 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Any way of adding a regression test to show the bug?
Any way of adding a regression test to show the bug?
That's a fair question. We haven't detected it thus far with tests and users have also not reported it. There might be something else that resets that property, so we've been hiding in the shadow of that for years.
I can look further
Re-assigning the local variable
injectedKeys
would not changesandbox.injectedKeys
, thusrestoreContext
doesn't fully restore the context.See:
https://lgtm.com/projects/g/sinonjs/sinon/snapshot/9e09e7d79bac5808ca98fac4f7419a20be4fc43d/files/lib/sinon/sandbox.js?sort=name&dir=ASC&mode=heatmap#x9f770d565ef51b7d:1