cda03665 days ago21 lines · 615 B| 1 | import { describe, expect, it } from "bun:test"; |
| 2 | |
| 3 | import { notFoundIfHidden } |
| 4 | |
| 5 | describe("notFoundIfHidden", () |
| 6 | it("404s a missing resource, and a private one asked for anonymously", |
| 7 | for (const status |
| 8 | expect(() => |
| 9 | "NEXT_HTTP_ERROR_FALLBACK;404", |
| 10 | ); |
| 11 | } |
| 12 | }); |
| 13 | |
| 14 | it("lets every other answer through to the caller", |
| 15 | for (const status |
| 16 | expect(() => |
| 17 | notFoundIfHidden(new Response |
| 18 | ).not.toThrow() |
| 19 | } |
| 20 | }); |
| 21 | }); |