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
Copy file name to clipboardExpand all lines: README.md
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,29 +123,21 @@ yarn add -D jest-extended
123
123
124
124
## Setup
125
125
126
-
Add jest-extended to your Jest setupTestFrameworkScriptFile configuration. [See for help](http://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string)
126
+
Add jest-extended to your Jest `setupFilesAfterEnv` configuration. [See for help](https://jestjs.io/docs/en/configuration.html#setupfilesafterenv-array)
127
127
128
128
```json
129
129
"jest": {
130
-
"setupTestFrameworkScriptFile": "jest-extended"
130
+
"setupFilesAfterEnv": ["jest-extended"]
131
131
}
132
132
```
133
133
134
-
If you are already using another test framework, like [jest-chain](https://github.com/mattphillips/jest-chain), then you should create a test setup file and `require` each of the frameworks you are using.
135
-
134
+
If you are already using another test framework, like [jest-chain](https://github.com/mattphillips/jest-chain), you just need to append `jest-extended` to the array of setup files
136
135
For example:
137
136
138
-
```js
139
-
// ./testSetup.js
140
-
require('jest-extended');
141
-
require('any other test framework libraries you are using');
0 commit comments