You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests for the webview script (Vitest + jsdom) #128
Why: tab switching, the file/workspace toggle, and clicks that open a file or highlight a variable all live in client/src/webview/script.ts, and nothing checks them today. getScript(vscode, document, window) already takes its dependencies as arguments, so no VS Code API needs faking.
What:
Call getScript with a { postMessage: vi.fn() } spy and a jsdom document and window.
Send messages with window.dispatchEvent(new MessageEvent('message', { data })), then check the rendered DOM and the spy's calls.
Stub window.mermaid for the state machine view, and reset modules between tests (diagram.ts keeps zoom/pan state at module level).
First cases: the ready message, tab switching, show-all toggling, and openFile/highlight messages on click.
Activity
Add webview script interaction tests (#142)