Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add clock.next() #31097

Merged
merged 2 commits into from
May 31, 2024
Merged

chore: add clock.next() #31097

merged 2 commits into from
May 31, 2024

Conversation

pavelfeldman
Copy link
Member

No description provided.

This comment has been minimized.

* since: v1.45
- returns: <[int]> Fake milliseconds since the unix epoch.

Advances the clock to the the moment of the first scheduled timer, firing it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if there are no timers scheduled?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need to follow up to respond.

tests/page/page-clock.spec.ts Outdated Show resolved Hide resolved
expect(calls).toEqual([{ params: [1] }, { params: [2] }]);
});

it('throws exception thrown by timer', async ({ page, calls }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior deserves being documented!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will follow up

Copy link
Contributor

Test results for "tests 1"

3 flaky ⚠️ [firefox-page] › page/page-request-continue.spec.ts:290:3 › should work with Cross-Origin-Opener-Policy
⚠️ [playwright-test] › ui-mode-test-screencast.spec.ts:21:5 › should show screenshots
⚠️ [webkit-page] › page/workers.spec.ts:243:3 › should support offline

27442 passed, 612 skipped
✔️✔️✔️

Merge workflow run.

@pavelfeldman pavelfeldman merged commit 76e977a into microsoft:main May 31, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants