E405 Require sandbox for test stubs · Issue #21799 · microsoft/vscode-mssql · GitHub
[go: up one dir, main page]

Skip to content

Require sandbox for test stubs #21799

@Benjin

Description

@Benjin

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)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0