(email: string)
| 29 | }); |
| 30 | |
| 31 | const signUpIdentity = async (email: string): Promise<AuthenticatedIdentity> => { |
| 32 | const inviteCode = await mintInviteCode(handler); |
| 33 | const res = await handler( |
| 34 | new Request(`${BASE}/api/auth/sign-up/email`, { |
| 35 | method: "POST", |
| 36 | headers: { "content-type": "application/json" }, |
| 37 | body: JSON.stringify({ email, password: "password-12345678", name: email, inviteCode }), |
| 38 | }), |
| 39 | ); |
| 40 | expect(res.status).toBe(200); |
| 41 | return identityFromResponse(res); |
| 42 | }; |
| 43 | |
| 44 | const signUp = async (email: string): Promise<string> => (await signUpIdentity(email)).token; |
| 45 |
no test coverage detected