Skip to content

Commit d60af75

Browse files
authored
Merge pull request #8 from FredericEspiau/patch-1
Make configuration easier for user of Jest 24+
2 parents 541e51c + 9a264b0 commit d60af75

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ yarn add -D jest-extended-snapshot
4646

4747
## Set up
4848

49-
Add `jest-extended-snapshot` to your Jest `setupTestFrameworkScriptFile` configuration. [See Jest website](https://jestjs.io/docs/en/configuration.html#setuptestframeworkscriptfile-string) for more information.
49+
### Jest 23
50+
51+
Add `jest-extended-snapshot` to your Jest `setupTestFrameworkScriptFile` configuration. [See Jest website](https://jestjs.io/docs/en/23.x/configuration#setuptestframeworkscriptfile-string) for more information.
5052

5153
```json
5254
"jest": {
@@ -72,6 +74,16 @@ Then in your Jest config:
7274
}
7375
```
7476

77+
### Jest version >= 24
78+
79+
Add `jest-extended-snapshot` to your `setupFilesAfterEnv` array in the Jest configuration. [See Jest website](https://jestjs.io/docs/en/configuration.html#setuptestframeworkscriptfile-string) for more information.
80+
81+
```json
82+
"jest": {
83+
"setupFilesAfterEnv": ["jest-extended-snapshot"]
84+
}
85+
```
86+
7587
## List of additional matchers (API)
7688

7789
### `.toVerifyAllCombinations([args])`

0 commit comments

Comments
 (0)