Skip to content

Commit 16d7cac

Browse files
authored
chore: add mention of snapshot format change in upgrade guide (#13038)
1 parent c91dbcf commit 16d7cac

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/UpgradingToJest29.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,16 @@ See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md#2900) fo
1414
## Compatibility
1515

1616
The supported Node versions are 14.15, 16.10, 18.0 and above.
17+
18+
## Snapshot format
19+
20+
As announced in the [Jest 28 blog post](/blog/2022/04/25/jest-28#future), Jets 29 has changed the default snapshot formatting to `{escapeString: false, printBasicPrototype: false}`.
21+
22+
If you want to keep the old behavior, you can set the `snapshotFormat` property to:
23+
24+
```diff
25+
+ snapshotFormat: {
26+
+ escapeString: true,
27+
+ printBasicPrototype: true
28+
+ }
29+
```

0 commit comments

Comments
 (0)