Files
dodo/frontend/vitest.setup.ts
T
bboysoul 058f353965
ci / gitleaks (push) Successful in 11s
ci / docker (push) Successful in 3m43s
feat: unify design tokens, five font weights, radius scale, restrained motion, AA contrast
2026-09-23 05:41:16 +08:00

12 lines
455 B
TypeScript

// Synchronous requestAnimationFrame so Vue <Transition> leave (double-rAF)
// settles in the same tick as close(), preserving tests' "dialog removed
// immediately" contract. Production keeps real browser frames.
globalThis.requestAnimationFrame = ((cb: FrameRequestCallback) => {
cb(Date.now())
return 1
}) as typeof globalThis.requestAnimationFrame
globalThis.cancelAnimationFrame = (() => {}) as typeof globalThis.cancelAnimationFrame
export {}