Skip to content

Commit d66b0bc

Browse files
authored
fixup tests (#87)
* add c8 code coverage script; fixup tests * revert package changes
1 parent bde1af6 commit d66b0bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/unit/panels/resultsPanel.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ suite("Results Panel Tests", () => {
2525
webview: {
2626
html: "",
2727
cspSource: "vscode-webview://test-source",
28-
asWebviewUri: (uri: Uri) => Uri.parse(`vscode-webview://test/${uri.path}`)
28+
asWebviewUri: (uri: Uri) => Uri.parse(`vscode-webview://test/${uri.path}`),
29+
// Assisted by CursorAI ; inserted onDidReceiveMessage
30+
onDidReceiveMessage: (callback: (message: any) => void) => {
31+
// Store the callback for potential use in tests
32+
(mockPanel.webview as any)._messageCallback = callback;
33+
return { dispose: () => {} };
34+
}
2935
},
3036
onDidDispose: (_callback: () => void) => ({ dispose: () => {} }),
3137
dispose: () => {},

0 commit comments

Comments
 (0)