WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 2a42821cbca1aa589e8c0619ebab7129939e03dc 25 lines 865 B view raw
1import { describe, it, expect } from "vitest"; 2import { isNotFoundError } from "../errors.js"; 3 4describe("isNotFoundError", () => { 5 it("returns true for AppView 404 error", () => { 6 const error = new Error("AppView API error: 404 Not Found"); 7 expect(isNotFoundError(error)).toBe(true); 8 }); 9 10 it("returns false for AppView 500 error", () => { 11 const error = new Error("AppView API error: 500 Internal Server Error"); 12 expect(isNotFoundError(error)).toBe(false); 13 }); 14 15 it("returns false for network error", () => { 16 const error = new Error("AppView network error: fetch failed"); 17 expect(isNotFoundError(error)).toBe(false); 18 }); 19 20 it("returns false for non-Error values", () => { 21 expect(isNotFoundError("not found")).toBe(false); 22 expect(isNotFoundError(null)).toBe(false); 23 expect(isNotFoundError(404)).toBe(false); 24 }); 25});