Skip to content

Commit

Permalink
test: delete tests for non-existing fastForwardTo (#31366)
Browse files Browse the repository at this point in the history
The tests repeat `it.describe('fastForward'` above them.
  • Loading branch information
yury-s committed Jun 18, 2024
1 parent 5fc5628 commit dbc54c7
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions tests/page/page-clock.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,34 +207,6 @@ it.describe('fastForward', () => {
});
});

it.describe('fastForwardTo', () => {
it.beforeEach(async ({ page }) => {
await page.clock.install({ time: 0 });
await page.clock.pauseAt(1000);
});

it(`ignores timers which wouldn't be run`, async ({ page, calls }) => {
await page.evaluate(async () => {
setTimeout(() => {
window.stub('should not be logged');
}, 1000);
});
await page.clock.fastForward(500);
expect(calls).toEqual([]);
});

it('pushes back execution time for skipped timers', async ({ page, calls }) => {
await page.evaluate(async () => {
setTimeout(() => {
window.stub(Date.now());
}, 1000);
});

await page.clock.fastForward(2000);
expect(calls).toEqual([{ params: [1000 + 2000] }]);
});
});

it.describe('stubTimers', () => {
it.beforeEach(async ({ page }) => {
await page.clock.install({ time: 0 });
Expand Down

0 comments on commit dbc54c7

Please sign in to comment.