(handler: Handler, email: string, password: string)
| 15 | const BASE = "http://localhost:4788/api"; |
| 16 | |
| 17 | const signInToken = async (handler: Handler, email: string, password: string): Promise<string> => { |
| 18 | const response = await handler( |
| 19 | new Request("http://localhost:4788/api/auth/sign-in/email", { |
| 20 | method: "POST", |
| 21 | headers: { "content-type": "application/json" }, |
| 22 | body: JSON.stringify({ email, password }), |
| 23 | }), |
| 24 | ); |
| 25 | return response.headers.get("set-auth-token") ?? ""; |
| 26 | }; |
| 27 | |
| 28 | // A FetchHttpClient backed by the in-process handler, carrying the admin bearer. |
| 29 | const clientLayer = (handler: Handler, token: string) => |
no test coverage detected