fix: test now uses stale pr_open status as described

The test "returns done when PR is merged even if session status is stale
(pr_open)" was using status: "merged" instead of status: "pr_open",
making it a duplicate of the existing test. Fixed to use the stale
status and removed the redundant second test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Prateek 2026-02-18 17:36:02 +05:30
parent 905f7bb17a
commit e273e666b7
1 changed files with 1 additions and 8 deletions

View File

@ -258,14 +258,7 @@ describe("getAttentionLevel", () => {
it("returns done when PR is merged even if session status is stale (pr_open)", () => {
// This is the exact bug scenario: metadata says "pr_open" but GitHub says "merged"
// After reconcileSessionStatus, status should be "merged" and attention level "done"
const pr = makePR({ state: "merged" });
const session = makeSession({ status: "merged", activity: "idle", pr });
expect(getAttentionLevel(session)).toBe("done");
});
it("returns done when PR state is merged regardless of session status", () => {
// getAttentionLevel checks pr.state directly for merged/closed
// getAttentionLevel checks pr.state directly, so it returns "done" even with stale status
const pr = makePR({ state: "merged" });
const session = makeSession({ status: "pr_open", activity: "idle", pr });
expect(getAttentionLevel(session)).toBe("done");