Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(assertions): remove unneeded await in generic assertions example (#26569)
Kevin Centenoba4c242a820d
diff --git a/docs/src/api/class-genericassertions.md b/docs/src/api/class-genericassertions.mdindex 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```jsconst 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.tsindex 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, Type, Matchers> = T extends Type ? Matchers : IfAny<T, Mat** test('assert a value', async ({ page }) => {* const value = 1;- * await expect(value).toBe(2);+ * expect(value).toBe(2);* });* ```*@@ -4548,7 +4548,7 @@ interface GenericAssertions<R> {** ```js* const value = 1;- * await expect(value).not.toBe(2);+ * expect(value).not.toBe(2);* ```**/