Skip to content

Commit 949bfa7

Browse files
committed
fix: fix checkpoint unit test
1 parent 7922443 commit 949bfa7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/core/webview/__tests__/webviewMessageHandler.checkpoint.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ describe("webviewMessageHandler - checkpoint operations", () => {
6464
// Call the handler with delete confirmation
6565
await webviewMessageHandler(mockProvider, {
6666
type: "deleteMessageConfirm",
67-
messageTs: 3,
67+
messageTs: 1,
6868
restoreCheckpoint: true,
6969
})
7070

7171
// Verify handleCheckpointRestoreOperation was called with correct parameters
7272
expect(handleCheckpointRestoreOperation).toHaveBeenCalledWith({
7373
provider: mockProvider,
7474
currentCline: mockCline,
75-
messageTs: 3,
76-
messageIndex: 2,
75+
messageTs: 1,
76+
messageIndex: 0,
7777
checkpoint: { hash: "abc123" },
7878
operation: "delete",
7979
})
@@ -107,7 +107,7 @@ describe("webviewMessageHandler - checkpoint operations", () => {
107107
// Call the handler with edit confirmation
108108
await webviewMessageHandler(mockProvider, {
109109
type: "editMessageConfirm",
110-
messageTs: 3,
110+
messageTs: 1,
111111
text: "Edited checkpoint message",
112112
restoreCheckpoint: true,
113113
})
@@ -116,14 +116,14 @@ describe("webviewMessageHandler - checkpoint operations", () => {
116116
expect(handleCheckpointRestoreOperation).toHaveBeenCalledWith({
117117
provider: mockProvider,
118118
currentCline: mockCline,
119-
messageTs: 3,
120-
messageIndex: 2,
119+
messageTs: 1,
120+
messageIndex: 0,
121121
checkpoint: { hash: "abc123" },
122122
operation: "edit",
123123
editData: {
124124
editedContent: "Edited checkpoint message",
125125
images: undefined,
126-
apiConversationHistoryIndex: 1,
126+
apiConversationHistoryIndex: 0,
127127
},
128128
})
129129
})

0 commit comments

Comments
 (0)