-
Notifications
You must be signed in to change notification settings - Fork 577
Require sandbox for test stubs #21799
Copy link
Copy link
Open
Milestone
Description
stubLogger defaults to using the global sinon instance when no sandbox is passed, and it stubs the static Logger.create method. If this helper is ever called without a sandbox (or without a corresponding global restore), it can leak the stub across tests and create ordering-dependent failures. Consider requiring a SinonSandbox parameter (no fallback) so callers always get automatic cleanup via sandbox.restore().
Originally posted by @Copilot in #21708 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels