docs: Improve clock doc (#31147)

This commit is contained in:
Darío Kondratiuk 2024-06-04 12:48:56 -04:00 committed by GitHub
parent 2d7bbe4d73
commit 76b25e84cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -106,7 +106,7 @@ Returns fake milliseconds since the unix epoch.
* since: v1.45
- returns: <[int]>
Advances the clock to the the moment of the first scheduled timer, firing it.
Advances the clock to the moment of the first scheduled timer, firing it.
Fake timers must be installed.
Returns fake milliseconds since the unix epoch.

View File

@ -202,7 +202,7 @@ await page.goto('http://localhost:3333');
// Tick through time manually, firing all timers in the process.
// In this case, time will be updated in the screen 2 times.
await page.clock.runFor(2000);
await expect(locator).to_have_text('2/2/2024, 10:00:02 AM')
await expect(locator).to_have_text('2/2/2024, 10:00:02 AM');
```
```python async

View File

@ -378,7 +378,7 @@ export function tokenize(str1: string): CSSTokenInterface[] {
};
const consumeEscape = function() {
// Assume the the current character is the \
// Assume the current character is the \
// and the next code point is not a newline.
consume();
if (hexdigit(code)) {

View File

@ -17311,8 +17311,8 @@ export interface Clock {
runToLastTimer(): Promise<number>;
/**
* Advances the clock to the the moment of the first scheduled timer, firing it. Fake timers must be installed.
* Returns fake milliseconds since the unix epoch.
* Advances the clock to the moment of the first scheduled timer, firing it. Fake timers must be installed. Returns
* fake milliseconds since the unix epoch.
*/
runToNextTimer(): Promise<number>;