MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / createMockSession

Function createMockSession

packages/web/src/middleware/withAuth.test.ts:69–79  ·  view source on GitHub ↗
(overrides: Partial<Session> = {})

Source from the content-addressed store, hash-verified

67
68// Helper to create mock session objects
69const createMockSession = (overrides: Partial<Session> = {}): Session => ({
70 user: {
71 id: 'test-user-id',
72 email: 'test@example.com',
73 name: 'Test User',
74 image: null,
75 ...overrides.user,
76 },
77 expires: '2099-01-01T00:00:00.000Z',
78 ...overrides,
79});
80
81
82beforeEach(() => {

Callers 1

withAuth.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected