MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / withAuth.test.ts

File withAuth.test.ts

packages/web/src/middleware/withAuth.test.ts:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { expect, test, vi, beforeEach, describe } from 'vitest';
2import { Session } from 'next-auth';
3import { notAuthenticated } from '../lib/serviceError';
4import { getAuthContext, getAuthenticatedUser, withAuth, withOptionalAuth } from './withAuth';

Callers

nothing calls this directly

Calls 8

getAuthenticatedUserFunction · 0.90
getAuthContextFunction · 0.90
withAuthFunction · 0.90
notAuthenticatedFunction · 0.90
withOptionalAuthFunction · 0.90
setMockSessionFunction · 0.85
createMockSessionFunction · 0.85
setMockHeadersFunction · 0.85

Tested by

no test coverage detected