diff --git a/docs/src/api/class-genericassertions.md b/docs/src/api/class-genericassertions.md index e9b1d0a71a..180a15dc4b 100644 --- a/docs/src/api/class-genericassertions.md +++ b/docs/src/api/class-genericassertions.md @@ -9,7 +9,7 @@ import { test, expect } from '@playwright/test'; test('assert a value', async ({ page }) => { const value = 1; - await expect(value).toBe(2); + expect(value).toBe(2); }); ``` @@ -21,7 +21,7 @@ Makes the assertion check for the opposite condition. For example, the following ```js const value = 1; -await expect(value).not.toBe(2); +expect(value).not.toBe(2); ``` diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index b737cf16fa..4baff0fb68 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -4537,7 +4537,7 @@ type ExtraMatchers = T extends Type ? Matchers : IfAny { * const value = 1; - * await expect(value).toBe(2); + * expect(value).toBe(2); * }); * ``` * @@ -4548,7 +4548,7 @@ interface GenericAssertions { * * ```js * const value = 1; - * await expect(value).not.toBe(2); + * expect(value).not.toBe(2); * ``` * */