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

Function doCallback

packages/deno/test/transport.ts:19–25  ·  view source on GitHub ↗
(request: TransportRequest)

Source from the content-addressed store, hash-verified

17export function makeTestTransport(callback: (envelope: Envelope) => void) {
18 return (options: BaseTransportOptions): Transport => {
19 async function doCallback(request: TransportRequest): Promise<TransportMakeRequestResponse> {
20 await callback(parseEnvelope(request.body));
21
22 return Promise.resolve({
23 statusCode: 200,
24 });
25 }
26
27 return createTransport(options, doCallback);
28 };

Callers

nothing calls this directly

Calls 3

parseEnvelopeFunction · 0.90
resolveMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected