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

Function setupClient

packages/core/test/lib/utils/traceData.test.ts:27–43  ·  view source on GitHub ↗
(opts?: Partial<TestClientOptions>)

Source from the content-addressed store, hash-verified

25const SCOPE_TRACE_ID = '12345678901234567890123456789012';
26
27function setupClient(opts?: Partial<TestClientOptions>): Client {
28 getCurrentScope().setPropagationContext({
29 traceId: SCOPE_TRACE_ID,
30 sampleRand: Math.random(),
31 });
32
33 const options = getDefaultTestClientOptions({
34 dsn,
35 tracesSampleRate: 1,
36 ...opts,
37 });
38 const client = new TestClient(options);
39 setCurrentClient(client);
40 client.init();
41
42 return client;
43}
44
45describe('getTraceData', () => {
46 beforeEach(() => {

Callers 1

traceData.test.tsFile · 0.70

Calls 5

getCurrentScopeFunction · 0.90
setCurrentClientFunction · 0.90
setPropagationContextMethod · 0.80
initMethod · 0.45

Tested by

no test coverage detected