Skip to content

Commit bf3695a

Browse files
PierrunoYTclaude
andcommitted
test(webview): assert the posted task history contents in the updateSettings case
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 223d3ed commit bf3695a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/core/webview/__tests__/ClineProvider.taskHistory.spec.ts‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,14 @@ describe("ClineProvider Task History Synchronization", () => {
989989
})
990990

991991
expect(postedStates()).toHaveLength(1)
992-
expect("taskHistory" in postedStates()[0]).toBe(expectHistory)
992+
const state = postedStates()[0]
993+
if (expectHistory) {
994+
expect(state.taskHistory).toEqual(
995+
expect.arrayContaining([expect.objectContaining({ id: "settings-task" })]),
996+
)
997+
} else {
998+
expect(state).not.toHaveProperty("taskHistory")
999+
}
9931000
},
9941001
)
9951002
})

0 commit comments

Comments
 (0)