(email: string)
| 19 | const BASE = "http://localhost:4788"; |
| 20 | |
| 21 | const signUp = async (email: string): Promise<string> => { |
| 22 | const inviteCode = await mintInviteCode(handler); |
| 23 | const res = await handler( |
| 24 | new Request(`${BASE}/api/auth/sign-up/email`, { |
| 25 | method: "POST", |
| 26 | headers: { "content-type": "application/json" }, |
| 27 | body: JSON.stringify({ email, password: "password-12345678", name: email, inviteCode }), |
| 28 | }), |
| 29 | ); |
| 30 | expect(res.status).toBe(200); |
| 31 | return res.headers.get("set-auth-token") ?? ""; |
| 32 | }; |
| 33 | |
| 34 | const mcp = (token: string, body: unknown, sessionId?: string) => |
| 35 | handler( |
no test coverage detected