Skip to content

Commit

Permalink
docs: Improve clock doc (#31147)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Jun 4, 2024
1 parent 2d7bbe4 commit 76b25e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/api/class-clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/clock.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions packages/playwright-core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand Down

0 comments on commit 76b25e8

Please sign in to comment.