(el: { id: string }, children: unknown[], now?: number)
| 8 | // Build a fake preview iframe whose runtime timeline holds the given child tweens |
| 9 | // and resolves `selector` to `el`. |
| 10 | function fakeIframe(el: { id: string }, children: unknown[], now?: number): HTMLIFrameElement { |
| 11 | const timeline = { |
| 12 | getChildren: () => children, |
| 13 | duration: () => 14.6, |
| 14 | ...(now != null ? { time: () => now } : {}), |
| 15 | }; |
| 16 | return { |
| 17 | contentWindow: { __timelines: { "index.html": timeline } }, |
| 18 | contentDocument: { querySelector: (sel: string) => (sel === `#${el.id}` ? el : null) }, |
| 19 | } as unknown as HTMLIFrameElement; |
| 20 | } |
| 21 | |
| 22 | describe("readRuntimeKeyframes — zero-duration set must not shadow the keyframed tween", () => { |
| 23 | const el = { id: "puck-b" }; |
no outgoing calls
no test coverage detected