()
| 533 | |
| 534 | describe('when "finish" is called while paused', () => { |
| 535 | async function getPausedLoop() { |
| 536 | const ctrl = new Controller<{ t: number }>({ |
| 537 | from: { t: 0 }, // FIXME: replace this line with `t: 0,` for a stack overflow |
| 538 | loop: { |
| 539 | async to(start) { |
| 540 | await start({ |
| 541 | t: 1, |
| 542 | reset: true, |
| 543 | }) |
| 544 | }, |
| 545 | }, |
| 546 | }) |
| 547 | |
| 548 | // Ensure `loop.to` has been called. |
| 549 | await flushMicroTasks() |
| 550 | |
| 551 | // Apply the first frame. |
| 552 | global.mockRaf.step() |
| 553 | |
| 554 | ctrl.pause() |
| 555 | return ctrl |
| 556 | } |
| 557 | |
| 558 | it('finishes immediately', async () => { |
| 559 | const ctrl = await getPausedLoop() |
no test coverage detected
searching dependent graphs…