MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / setTestUser

Function setTestUser

server/tests/integration/perspective-assets.test.ts:24–31  ·  view source on GitHub ↗
(req: any)

Source from the content-addressed store, hash-verified

22// Mock auth middleware to bypass authentication
23vi.mock('../../src/middleware/auth.js', () => {
24 const setTestUser = (req: any) => {
25 req.user = {
26 id: 'user_test_assets',
27 email: 'test-assets@example.com',
28 is_admin: true,
29 firstName: 'Test',
30 };
31 };
32 const passthrough = (_req: any, _res: any, next: any) => next();
33 return {
34 requireAuth: (req: any, _res: any, next: any) => { setTestUser(req); next(); },

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected