You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ESLint globals for your [Jest](https://jestjs.io/)[Playwright](https://github.com/microsoft/playwright) ([jest-playwright](https://github.com/mmarkelov/jest-playwright/)) installation.
3
+
> ESLint plugin for your [Jest](https://jestjs.io/)[Playwright](https://github.com/microsoft/playwright) ([jest-playwright](https://github.com/mmarkelov/jest-playwright/)) installation.
4
+
5
+
## Installation
6
+
7
+
Yarn
8
+
9
+
```txt
10
+
yarn add -D eslint-plugin-jest-playwright
11
+
```
12
+
13
+
NPM
14
+
15
+
```txt
16
+
npm install -D eslint-plugin-jest-playwright
17
+
```
4
18
5
19
## Usage
6
20
7
21
Add `plugin:jest-playwright/recommended` to your extends ESLint configuration. For example:
Enforce Jest Playwright expect statements to be awaited.
35
+
36
+
#### Example
37
+
38
+
Example of **incorrect** code for this rule:
39
+
40
+
```js
41
+
expect(page).toHaveText("text");
23
42
```
24
43
25
-
NPM
44
+
Example of **correct** code for this rule:
26
45
27
-
```txt
28
-
npm install -D eslint-plugin-jest-playwright
46
+
```js
47
+
awaitexpect(page).toHaveText("text");
48
+
```
49
+
50
+
#### Options
51
+
52
+
The rule accepts a non-required option which can be used to specify custom matchers which this rule should also warn about. This is useful when creating your own async matchers.
0 commit comments