(code: string)
| 28 | ); |
| 29 | |
| 30 | const inviteStatus = async (code: string): Promise<boolean> => { |
| 31 | const response = await handler( |
| 32 | new Request(`${BASE}/api/invite-status/${encodeURIComponent(code)}`), |
| 33 | ); |
| 34 | expect(response.status).toBe(200); |
| 35 | const body = (await response.json()) as { valid?: boolean }; |
| 36 | return body.valid === true; |
| 37 | }; |
| 38 | |
| 39 | test("open signup is closed: a signup without a valid invite code is rejected", async () => { |
| 40 | const res = await signUp({ |
no test coverage detected