import "@testing-library/jest-dom/vitest"; import { cleanup, configure } from "@testing-library/react"; import { afterEach, vi } from "vitest"; afterEach(() => { cleanup(); // The board remembers what was seen per location (CR-008); start each test fresh. if (typeof localStorage !== "undefined") localStorage.clear(); }); // findBy*/waitFor default to 1 s, which a busy parallel run can exceed; wait up to 3 s. configure({ asyncUtilTimeout: 3000 }); // PixiJS needs WebGL, which jsdom lacks. Component tests use a stand-in canvas; // the map's logic (projection, camera, scene, hit-testing) is unit-tested directly. vi.mock("../src/map/MapCanvas", () => import("./map-canvas-double"));