MCPcopy Create free account
hub / github.com/ReactiveX/rxjs / configureAnimation

Method configureAnimation

packages/test/src/virtual-time.ts:234–251  ·  view source on GitHub ↗
(plan: TestTimingPlan)

Source from the content-addressed store, hash-verified

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) {

Callers 1

animateMethod · 0.80

Calls 3

#enqueueMethod · 0.95
#runAnimationFrameMethod · 0.95
parseTimingPlanFunction · 0.85

Tested by

no test coverage detected