Download mobile/src/utils/auth/authErrors.test.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/utils/auth/authErrors.test.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/src/utils/auth/authErrors.test.ts
-
curl -L -o authErrors.test.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/utils/auth/authErrors.test.ts
520 Bytes
| import {mapAuthError} from "./authErrors" | |
| it.each([ | |
| ["invalid_reset_link", "login:errors.invalidResetLink"], | |
| ["otp_expired", "login:errors.otpExpired"], | |
| ])("maps the sign-in screen's authError code %s to its message", (code, key) => { | |
| expect(mapAuthError(code)).toBe(key) | |
| }) | |
| it.each(["constructor", "toString", "__proto__"])("treats a link's %s as an unknown error, not a code", (code) => { | |
| expect(typeof mapAuthError(code)).toBe("string") | |
| expect(mapAuthError(code)).not.toMatch(/^function/) | |
| }) | |