(email: string)
| 43 | }); |
| 44 | |
| 45 | const signUp = async (email: string): Promise<string> => { |
| 46 | const inviteCode = await mintInviteCode(handler); |
| 47 | const res = await handler( |
| 48 | new Request(`${BASE}/api/auth/sign-up/email`, { |
| 49 | method: "POST", |
| 50 | headers: { "content-type": "application/json" }, |
| 51 | body: JSON.stringify({ |
| 52 | email, |
| 53 | password: "password-12345678", |
| 54 | name: email, |
| 55 | inviteCode, |
| 56 | }), |
| 57 | }), |
| 58 | ); |
| 59 | expect(res.status).toBe(200); |
| 60 | const token = res.headers.get("set-auth-token") ?? ""; |
| 61 | expect(token).not.toBe(""); |
| 62 | return token; |
| 63 | }; |
| 64 | |
| 65 | const orgIdOf = async (token: string): Promise<string> => { |
| 66 | const res = await handler( |
no test coverage detected