mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
docs(assertions): remove unneeded await in generic assertions example (#26569)
This commit is contained in:
parent
06d2e7d480
commit
ba4c242a82
@ -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);
|
||||
```
|
||||
|
||||
|
||||
|
4
packages/playwright-test/types/test.d.ts
vendored
4
packages/playwright-test/types/test.d.ts
vendored
@ -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);
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user