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
Add your setup script to your Jest `setupFilesAfterEnv` configuration. [See for help](https://jestjs.io/docs/en/configuration.html#setupfilesafterenv-array)
26
25
27
-
```json
26
+
```json title="package.json"
28
27
"jest": {
29
28
"setupFilesAfterEnv": ["./testSetup.js"]
30
29
}
31
30
```
32
31
33
32
To automatically extend `expect` with all matchers, you can use
34
33
35
-
```json
34
+
```json title="package.json"
36
35
"jest": {
37
36
"setupFilesAfterEnv": ["jest-extended/all"]
38
37
}
@@ -42,15 +41,15 @@ To automatically extend `expect` with all matchers, you can use
42
41
43
42
`jest-extended` works with `vitest` because their `expect.extend` API is compatible. In your setup script:
0 commit comments