Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
1.0 kB · 33 lines
TypeScript
at main
12345678910111213141516171819202122232425262728293031323334// Second preload (after happydom.ts registers the DOM): Testing Library matchers,// per-test cleanup, and a synchronous framer-motion so exit animations never defer// DOM removal (present/absent assertions stay deterministic).import { afterEach, expect, mock } from "bun:test";import { cleanup } from "@testing-library/react";import * as matchers from "@testing-library/jest-dom/matchers";import { createElement } from "react";
expect.extend(matchers);afterEach(() => cleanup());
// AnimatePresence -> passthrough; motion.* -> plain tag (animation-only props// stripped to avoid React "unknown prop" warnings).mock.module("framer-motion", () => ({ AnimatePresence: ({ children }: any) => children, motion: new Proxy({} as any, { get: (_t, tag: string) => ({ children, initial, animate, exit, transition, layout, variants, whileHover, whileTap, ...rest }: any) => createElement(tag, rest, children), }),}));