From c27777c4a5825927f15cd30fa506ce67bc895bff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 23 May 2026 05:01:40 +0000 Subject: [PATCH 1/2] fix(frontend): stub ResizeObserver in vitest jsdom setup Agent-Logs-Url: https://github.com/AlanFokCo/EasyQuant/sessions/03e40b4c-7fbe-4693-957f-4e043ae38190 Co-authored-by: AlanFokCo <49893220+AlanFokCo@users.noreply.github.com> --- web_strategy_studio/frontend/src/test/setup.ts | 11 +++++++++++ web_strategy_studio/frontend/vite.config.ts | 1 + 2 files changed, 12 insertions(+) create mode 100644 web_strategy_studio/frontend/src/test/setup.ts diff --git a/web_strategy_studio/frontend/src/test/setup.ts b/web_strategy_studio/frontend/src/test/setup.ts new file mode 100644 index 0000000..81d81ec --- /dev/null +++ b/web_strategy_studio/frontend/src/test/setup.ts @@ -0,0 +1,11 @@ +import { vi } from "vitest"; + +if (!("ResizeObserver" in globalThis)) { + class ResizeObserver { + observe() {} + unobserve() {} + disconnect() {} + } + + vi.stubGlobal("ResizeObserver", ResizeObserver); +} diff --git a/web_strategy_studio/frontend/vite.config.ts b/web_strategy_studio/frontend/vite.config.ts index eaa0031..f98df2a 100644 --- a/web_strategy_studio/frontend/vite.config.ts +++ b/web_strategy_studio/frontend/vite.config.ts @@ -16,6 +16,7 @@ export default defineConfig({ }, test: { environment: "jsdom", + setupFiles: "./src/test/setup.ts", passWithNoTests: true, }, }); From 95906e7e1a5072797c89b524d2922bd4d064c291 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 23 May 2026 05:03:26 +0000 Subject: [PATCH 2/2] chore(test): align ResizeObserver stub with Web API signature Agent-Logs-Url: https://github.com/AlanFokCo/EasyQuant/sessions/03e40b4c-7fbe-4693-957f-4e043ae38190 Co-authored-by: AlanFokCo <49893220+AlanFokCo@users.noreply.github.com> --- web_strategy_studio/frontend/src/test/setup.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web_strategy_studio/frontend/src/test/setup.ts b/web_strategy_studio/frontend/src/test/setup.ts index 81d81ec..b67bfcf 100644 --- a/web_strategy_studio/frontend/src/test/setup.ts +++ b/web_strategy_studio/frontend/src/test/setup.ts @@ -2,8 +2,8 @@ import { vi } from "vitest"; if (!("ResizeObserver" in globalThis)) { class ResizeObserver { - observe() {} - unobserve() {} + observe(_target: Element, _options?: ResizeObserverOptions) {} + unobserve(_target: Element) {} disconnect() {} }