MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / resetGlobals

Function resetGlobals

packages/node/test/helpers/mockSdkInit.ts:11–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9const PUBLIC_DSN = 'https://username@domain/123';
10
11export function resetGlobals(): void {
12 getCurrentScope().clear();
13 getCurrentScope().setClient(undefined);
14 getIsolationScope().clear();
15 getGlobalScope().clear();
16}
17
18export function mockSdkInit(options?: Partial<NodeClientOptions>) {
19 resetGlobals();

Callers 3

scope.test.tsFile · 0.90
preload.test.tsFile · 0.90
mockSdkInitFunction · 0.70

Calls 5

getCurrentScopeFunction · 0.90
getIsolationScopeFunction · 0.90
getGlobalScopeFunction · 0.90
setClientMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected