docs(assertions): remove unneeded await in generic assertions example (#26569)

This commit is contained in:
Kevin Centeno 2023-08-21 12:13:25 -04:00 committed by GitHub
parent 06d2e7d480
commit ba4c242a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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);
```

View File

@ -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);
* ```
*
*/