From 6e160877792768e89290ec73dc091ac898634c2a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 18 Feb 2026 23:13:16 +0900 Subject: [PATCH] fix(tests): update atlas hook and auto-update-checker tests - atlas hook: update verification reminder assertions to match new 4-phase QA system (MANDATORY -> PHASE 1/2, LIE -> LYING) - auto-update-checker: add missing revertPinnedVersion mock export to fix SyntaxError in background-update-check tests Note: 4 auto-update-checker tests fail only when run alongside checker.test.ts due to bun mock.module isolation issue (pre-existing in v3.7.3, not a regression) --- src/hooks/atlas/index.test.ts | 16 ++++++++-------- .../hook/background-update-check.test.ts | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/hooks/atlas/index.test.ts b/src/hooks/atlas/index.test.ts index 520258572..065f20b9e 100644 --- a/src/hooks/atlas/index.test.ts +++ b/src/hooks/atlas/index.test.ts @@ -180,8 +180,8 @@ describe("atlas hook", () => { // then - standalone verification reminder appended expect(output.output).toContain("Task completed successfully") - expect(output.output).toContain("MANDATORY:") - expect(output.output).toContain("task(session_id=") + expect(output.output).toContain("LYING") + expect(output.output).toContain("PHASE 1") cleanupMessageStorage(sessionID) }) @@ -219,8 +219,8 @@ describe("atlas hook", () => { expect(output.output).toContain("Task completed successfully") expect(output.output).toContain("SUBAGENT WORK COMPLETED") expect(output.output).toContain("test-plan") - expect(output.output).toContain("LIE") - expect(output.output).toContain("task(session_id=") + expect(output.output).toContain("LYING") + expect(output.output).toContain("PHASE 1") cleanupMessageStorage(sessionID) }) @@ -401,10 +401,10 @@ describe("atlas hook", () => { output ) - // then - should include session_id instructions and verification - expect(output.output).toContain("task(session_id=") - expect(output.output).toContain("[x]") - expect(output.output).toContain("MANDATORY:") + // then - should include verification instructions + expect(output.output).toContain("LYING") + expect(output.output).toContain("PHASE 1") + expect(output.output).toContain("PHASE 2") cleanupMessageStorage(sessionID) }) diff --git a/src/hooks/auto-update-checker/hook/background-update-check.test.ts b/src/hooks/auto-update-checker/hook/background-update-check.test.ts index 8d3009b5d..84502227a 100644 --- a/src/hooks/auto-update-checker/hook/background-update-check.test.ts +++ b/src/hooks/auto-update-checker/hook/background-update-check.test.ts @@ -16,6 +16,7 @@ mock.module("../checker", () => ({ getCachedVersion: mockGetCachedVersion, getLatestVersion: mockGetLatestVersion, updatePinnedVersion: mockUpdatePinnedVersion, + revertPinnedVersion: mock(() => false), })) mock.module("../version-channel", () => ({