fix(test): add _resetForTesting to all session state tests

This commit is contained in:
justsisyphus
2026-01-17 17:04:40 +09:00
parent b4fa31a47a
commit fa9bf4590c
5 changed files with 44 additions and 50 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import { describe, expect, test, beforeEach, afterEach, spyOn } from "bun:test"
import { createSessionNotification } from "./session-notification"
import { setMainSession, subagentSessions } from "../features/claude-code-session-state"
import { setMainSession, subagentSessions, _resetForTesting } from "../features/claude-code-session-state"
import * as utils from "./session-notification-utils"
describe("session-notification", () => {
@@ -30,6 +30,7 @@ describe("session-notification", () => {
}
beforeEach(() => {
_resetForTesting()
notificationCalls = []
spyOn(utils, "getOsascriptPath").mockResolvedValue("/usr/bin/osascript")