mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-26 12:35:35 +02:00
Add vitest configs to packages/core and packages/views. Test deps added to pnpm catalog for unified versioning. Web test deps migrated to catalog references. pnpm test now discovers all packages. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
17 lines
547 B
TypeScript
17 lines
547 B
TypeScript
import "@testing-library/jest-dom/vitest";
|
|
|
|
// jsdom doesn't provide ResizeObserver; stub it so components that rely on it
|
|
// (e.g. input-otp) can render in tests.
|
|
if (typeof globalThis.ResizeObserver === "undefined") {
|
|
globalThis.ResizeObserver = class ResizeObserver {
|
|
observe() {}
|
|
unobserve() {}
|
|
disconnect() {}
|
|
} as unknown as typeof ResizeObserver;
|
|
}
|
|
|
|
// jsdom doesn't implement elementFromPoint; input-otp uses it internally.
|
|
if (typeof document.elementFromPoint !== "function") {
|
|
document.elementFromPoint = () => null;
|
|
}
|