feat(run): add TerminalView xterm.js component for the PTY transport
- TerminalView.tsx: xterm.js component with WebSocket attachment to /ws-pty/:runId - Test: validates WS connection URL, incoming terminal data, and outgoing keystrokes - Added ResizeObserver stub to test-setup.ts for jsdom environment
This commit is contained in:
@@ -16,6 +16,13 @@ import { afterEach, beforeEach } from "vitest";
|
||||
import "./i18n/index";
|
||||
import i18n from "i18next";
|
||||
|
||||
/** jsdom does not implement ResizeObserver — stub it for components that use it. */
|
||||
// @ts-expect-error global stub
|
||||
global.ResizeObserver = class {
|
||||
observe() {}
|
||||
disconnect() {}
|
||||
};
|
||||
|
||||
/** Pin locale to English — LanguageDetector may otherwise pick up zh/vi from the host OS. */
|
||||
beforeEach(() => {
|
||||
i18n.changeLanguage("en");
|
||||
|
||||
Reference in New Issue
Block a user