test: remove duplicate result assertions before throwing guards

This commit is contained in:
morluto
2026-10-09 02:33:01 +08:00
parent 5945915f91
commit a1b7d40bb0
33 changed files with 0 additions and 62 deletions
@@ -43,7 +43,6 @@ describe("JavaScript analysis cancellation before publication", () => {
},
);
expect(requested).toBe(true);
expect(result.ok).toBe(false);
if (result.ok)
throw new Error("Cancelled analysis must not publish Evidence");
expect(projectAnalysisError(result.error)).toMatchObject({
@@ -68,7 +67,6 @@ describe("JavaScript analysis cancellation before publication", () => {
},
},
);
expect(result.ok).toBe(false);
if (result.ok) throw new Error("Expected cancellation before admission");
expect(projectAnalysisError(result.error)).toMatchObject({
details: { reason: "cancelled" },