9 lines
404 B
TypeScript
9 lines
404 B
TypeScript
// Runs before every test file, and before setup.ts, whose imports load React:
|
|
// what jsdom leaves out that React looks for as it loads.
|
|
|
|
// Finding no AnimationEvent, React listens for the animation events under
|
|
// their old WebKit names, and `fireEvent.animationIteration` reaches no
|
|
// handler.
|
|
(globalThis as { AnimationEvent?: unknown }).AnimationEvent ??=
|
|
class AnimationEvent extends Event {};
|