Spaces:
Runtime error
Runtime error
Download apps/web/src/lib/env.test.ts from Oheha/cybully-api: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/spaces/Oheha/cybully-api/resolve/main/apps/web/src/lib/env.test.ts
- Command line
-
hf download hf://spaces/Oheha/cybully-api/apps/web/src/lib/env.test.ts
-
curl -L -o env.test.ts https://huggingface.co/spaces/Oheha/cybully-api/resolve/main/apps/web/src/lib/env.test.ts
449 Bytes
| import { describe, expect, it, vi } from "vitest"; | |
| describe("moderator email parsing", () => { | |
| it("matches configured moderator addresses case-insensitively", async () => { | |
| vi.stubEnv("MODERATOR_EMAILS", "MODERATOR@example.com,ops@example.com"); | |
| const { isModeratorEmail } = await import("./env"); | |
| expect(isModeratorEmail("moderator@example.com")).toBe(true); | |
| expect(isModeratorEmail("user@example.com")).toBe(false); | |
| }); | |
| }); | |