From 76b25e84cc90fc8dd1b8df714ed8dd5b286a1a53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Tue, 4 Jun 2024 12:48:56 -0400 Subject: [PATCH] docs: Improve clock doc (#31147) --- docs/src/api/class-clock.md | 2 +- docs/src/clock.md | 2 +- packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts | 2 +- packages/playwright-core/types/types.d.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/api/class-clock.md b/docs/src/api/class-clock.md index 95fa0b69d327e..31115db41be8f 100644 --- a/docs/src/api/class-clock.md +++ b/docs/src/api/class-clock.md @@ -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. diff --git a/docs/src/clock.md b/docs/src/clock.md index 4339e4bc6045e..5299145916a10 100644 --- a/docs/src/clock.md +++ b/docs/src/clock.md @@ -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 diff --git a/packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts b/packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts index f72ef27eb4d35..43b0a4586912f 100644 --- a/packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts +++ b/packages/playwright-core/src/utils/isomorphic/cssTokenizer.ts @@ -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)) { diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 92a3b130df095..dc91c655f09ad 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -17311,8 +17311,8 @@ export interface Clock { runToLastTimer(): Promise; /** - * 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;