test: remove duplicate result assertions before throwing guards

This commit is contained in:
morluto
2026-10-09 02:58:03 +08:00
parent 5945915f91
commit a1b7d40bb0
33 changed files with 0 additions and 62 deletions
-1
View File
@@ -5,7 +5,6 @@ import { safeParseJson } from "./safeJson.js";
it("keeps the original JSON parse failure as the cause", () => {
const parsed = safeParseJson("{");
expect(parsed.ok).toBe(false);
if (parsed.ok) throw new Error("expected invalid JSON to fail");
expect(parsed.error).toContain("JSON");
expect(parsed.cause).toBeInstanceOf(SyntaxError);