Skip to content

Commit adc35f5

Browse files
committed
fix: update test to expect translation key instead of translated string
The test was expecting the actual translated message but since t() is mocked to return the key, it should expect the translation key instead.
1 parent c76b725 commit adc35f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ describe("webviewMessageHandler delete functionality", () => {
158158
messageTs: 9999,
159159
})
160160

161-
// Verify error message was shown
162-
expect(vscode.window.showErrorMessage).toHaveBeenCalledWith("Message with timestamp 9999 not found")
161+
// Verify error message was shown (expecting translation key since t() is mocked to return the key)
162+
expect(vscode.window.showErrorMessage).toHaveBeenCalledWith("common:errors.message.message_not_found")
163163

164164
// Verify no truncation occurred
165165
expect(getCurrentTaskMock.overwriteClineMessages).not.toHaveBeenCalled()

0 commit comments

Comments
 (0)