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

Function createMockClient

packages/remix/test/server/errors.test.ts:12–28  ·  view source on GitHub ↗
(httpBodies: string[] = [])

Source from the content-addressed store, hash-verified

10import { errorHandleDataFunction } from '../../src/server/errors';
11
12function createMockClient(httpBodies: string[] = []): Client {
13 return {
14 getDataCollectionOptions: () => ({
15 userInfo: false,
16 cookies: true,
17 httpHeaders: { request: true, response: true },
18 httpBodies,
19 queryParams: true,
20 genAI: { inputs: true, outputs: true },
21 stackFrameVariables: true,
22 frameContextLines: 5,
23 }),
24 getOptions: () => ({
25 captureActionFormDataKeys: { username: true },
26 }),
27 } as unknown as Client;
28}
29
30describe('errorHandleDataFunction', () => {
31 beforeEach(() => {

Callers 1

errors.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected