MCPcopy Create free account
hub / github.com/codeaashu/claude-code / mockReq

Function mockReq

src/server/web/__tests__/auth.test.ts:6–8  ·  view source on GitHub ↗
(url: string, host = "localhost:3000")

Source from the content-addressed store, hash-verified

4import { ConnectionRateLimiter, validateAuthToken } from "../auth.js";
5
6function mockReq(url: string, host = "localhost:3000"): IncomingMessage {
7 return { url, headers: { host } } as unknown as IncomingMessage;
8}
9
10describe("validateAuthToken", () => {
11 const originalEnv = process.env.AUTH_TOKEN;

Callers 1

auth.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected