MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / mockSdkInit

Function mockSdkInit

packages/node/test/helpers/mockSdkInit.ts:18–28  ·  view source on GitHub ↗
(options?: Partial<NodeClientOptions>)

Source from the content-addressed store, hash-verified

16}
17
18export function mockSdkInit(options?: Partial<NodeClientOptions>) {
19 resetGlobals();
20 init({
21 dsn: PUBLIC_DSN,
22 defaultIntegrations: false,
23 // We are disabling client reports because we would be acquiring resources with every init call and that would leak
24 // memory every time we call init in the tests
25 sendClientReports: false,
26 ...options,
27 });
28}
29
30export function cleanupOtel(_provider?: BasicTracerProvider): void {
31 const provider = getProvider(_provider);

Callers 4

scope.test.tsFile · 0.90
api.test.tsFile · 0.90

Calls 2

initFunction · 0.90
resetGlobalsFunction · 0.70

Tested by

no test coverage detected