12 lines
455 B
TypeScript
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 {}
|