Skip to content

Commit 2d4d8d0

Browse files
committed
Tighten assertions to test invariants instead of disjunctions
1 parent 82e299c commit 2d4d8d0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

tests/e2e/basic.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ describe("agenticoding E2E", () => {
104104
await h.waitForText("ERR:");
105105
const snap = h.snapshot();
106106
assert.ok(
107-
snap.includes("authoritative") || snap.includes("already exists"),
107+
snap.includes("authoritative"),
108108
"human-set topic blocks agent override",
109109
);
110110
}));

tests/unit/register-loader.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ test("register-loader errors when entry file does not exist", () => {
4646
);
4747

4848
assert.notEqual(result.status, 0, "should exit non-zero for missing entry");
49+
// Node.js always includes the path in ENOENT errors, so checking for "nonexistent" is sufficient
4950
assert.ok(
50-
result.stderr.includes("nonexistent") || result.stderr.includes("ENOENT"),
51+
result.stderr.includes("nonexistent"),
5152
"stderr should reference the missing file, got: " + result.stderr,
5253
);
5354
} finally {

0 commit comments

Comments
 (0)