Download packages/app/src/pages/error-description.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/pages/error-description.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/pages/error-description.test.ts
-
curl -L -o error-description.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/pages/error-description.test.ts
681 Bytes
| import { describe, expect, test } from "bun:test" | |
| import { errorDescriptionKey } from "./error-description" | |
| describe("error description", () => { | |
| test("describes local server startup errors", () => { | |
| expect(errorDescriptionKey(Object.assign(new Error("migration failed"), { localServerStartup: true }))).toBe( | |
| "error.page.description.localServerStartup", | |
| ) | |
| }) | |
| test("uses the generic description for other errors", () => { | |
| expect(errorDescriptionKey(new Error("unknown"))).toBe("error.page.description") | |
| expect(errorDescriptionKey(Object.assign(new Error("unknown"), { localServerStartup: false }))).toBe( | |
| "error.page.description", | |
| ) | |
| }) | |
| }) | |