test(harness): support node-side control plane specs

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-03-24 18:34:56 +08:00
parent c177fbefa4
commit 7b51090823
2 changed files with 61 additions and 57 deletions
+4
View File
@@ -7,9 +7,12 @@ import { matchesMediaQuery, resetAccessibilityPreferences } from "./a11y";
afterEach(() => {
resetAccessibilityPreferences();
if (typeof document !== "undefined") {
cleanup();
}
});
if (typeof window !== "undefined" && typeof MouseEvent !== "undefined") {
class ResizeObserverMock {
observe() {}
unobserve() {}
@@ -65,3 +68,4 @@ Object.defineProperty(window.HTMLElement.prototype, "setPointerCapture", {
configurable: true,
value: vi.fn()
});
}
+1 -1
View File
@@ -49,7 +49,7 @@ export default defineConfig({
test: {
clearMocks: true,
environment: "jsdom",
include: ["packages/ui/src/**/*.test.{ts,tsx}"],
include: ["packages/ui/src/**/*.test.{ts,tsx}", "scripts/harness/**/*.test.ts"],
restoreMocks: true,
setupFiles: [path.resolve(rootDir, "packages/ui/src/test/setup.ts")]
}