(plan: TestTimingPlan)
| 232 | } |
| 233 | |
| 234 | configureAnimation(plan: TestTimingPlan): void { |
| 235 | if (this.#animationConfigured) { |
| 236 | throw new Error('animate() can be called only once per rxTest.'); |
| 237 | } |
| 238 | if (this.#now !== 0) { |
| 239 | throw new Error('animate() must be called before virtual time advances.'); |
| 240 | } |
| 241 | this.#animationConfigured = true; |
| 242 | for (const dueTime of parseTimingPlan(plan)) { |
| 243 | this.#enqueue({ |
| 244 | id: ++this.#nextId, |
| 245 | kind: 'animation', |
| 246 | dueTime, |
| 247 | active: () => true, |
| 248 | run: () => this.#runAnimationFrame(), |
| 249 | }); |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | configureIdle(plan: TestTimingPlan, options?: TestIdleOptions): void { |
| 254 | if (this.#idleConfigured) { |
no test coverage detected