From 16d7cacf8da3c5e2e6cb6fd93f7944ede6b1c437 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Sun, 17 Jul 2022 23:38:16 +0200 Subject: [PATCH] chore: add mention of snapshot format change in upgrade guide (#13038) --- docs/UpgradingToJest29.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/UpgradingToJest29.md b/docs/UpgradingToJest29.md index e589f35880e4..a924b1a2d17e 100644 --- a/docs/UpgradingToJest29.md +++ b/docs/UpgradingToJest29.md @@ -14,3 +14,16 @@ See [changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md#2900) fo ## Compatibility The supported Node versions are 14.15, 16.10, 18.0 and above. + +## Snapshot format + +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}`. + +If you want to keep the old behavior, you can set the `snapshotFormat` property to: + +```diff ++ snapshotFormat: { ++ escapeString: true, ++ printBasicPrototype: true ++ } +```