fix(test): add nested beforeEach for mainSessionID test isolation
Previous test was setting mainSessionID to 'main-session-123' and the next test expected undefined. The outer beforeEach wasn't properly resetting state between tests in the nested describe block. Adding a nested beforeEach ensures proper test isolation.
This commit is contained in:
@@ -82,6 +82,11 @@ describe("claude-code-session-state", () => {
|
||||
})
|
||||
|
||||
describe("mainSessionID", () => {
|
||||
beforeEach(() => {
|
||||
// #given - ensure clean state for mainSessionID tests
|
||||
setMainSession(undefined)
|
||||
})
|
||||
|
||||
test("should store and retrieve main session ID", () => {
|
||||
// #given
|
||||
const mainID = "main-session-123"
|
||||
|
||||
Reference in New Issue
Block a user