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

Function getTestClient

packages/deno/test/mod.test.ts:9–24  ·  view source on GitHub ↗
(callback: (event?: Event) => void)

Source from the content-addressed store, hash-verified

7import { makeTestTransport } from './transport.ts';
8
9function getTestClient(callback: (event?: Event) => void): DenoClient {
10 const client = new DenoClient({
11 dsn: 'https://233a45e5efe34c47a3536797ce15dafa@nothing.here/5650507',
12 debug: true,
13 integrations: getDefaultIntegrations({}),
14 stackParser: createStackParser(nodeStackLineParser()),
15 transport: makeTestTransport(envelope => {
16 callback(getNormalizedEvent(envelope));
17 }),
18 });
19
20 client.init();
21 getCurrentScope().setClient(client);
22
23 return client;
24}
25
26function delay(time: number): Promise<void> {
27 return new Promise(resolve => {

Callers 1

mod.test.tsFile · 0.70

Calls 9

getDefaultIntegrationsFunction · 0.90
createStackParserFunction · 0.90
nodeStackLineParserFunction · 0.90
makeTestTransportFunction · 0.90
getNormalizedEventFunction · 0.90
setClientMethod · 0.80
callbackFunction · 0.50
getCurrentScopeFunction · 0.50
initMethod · 0.45

Tested by

no test coverage detected