fix: use _resetForTesting() consistently to prevent flaky tests (#1318)

- Replace setMainSession(undefined) with _resetForTesting() in keyword-detector tests
- Add _resetForTesting() to afterEach hooks for proper cleanup
- Un-skip the previously flaky mainSessionID test in state.test.ts

Fixes #848

Co-authored-by: 배지훈 <new0126@naver.com>
This commit is contained in:
YeonGyu-Kim
2026-01-31 16:34:07 +09:00
committed by GitHub
parent 65a572fe66
commit 570a2e0583
3 changed files with 17 additions and 33 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ describe("session-notification", () => {
afterEach(() => {
// #given - cleanup after each test
subagentSessions.clear()
setMainSession(undefined)
_resetForTesting()
})
test("should not trigger notification for subagent session", async () => {