Skip to content

Commit

Permalink
feat(jest): use better snapshotFormat settings
Browse files Browse the repository at this point in the history
These settings will become default in jest@29.
As they're objectively better - let's adopt them now!
  • Loading branch information
kirillgroshkov committed Apr 25, 2022
1 parent fcc8ad6 commit e58b052
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cfg/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ module.exports = {
},
testEnvironment: 'node',
errorOnDeprecated: true,
// this config would have the snapshot formatter not print a prefix for "Object" and "Array"
// snapshotFormat: {
// printBasicPrototype: false,
// },
snapshotFormat: {
// todo: remove when jest@29 makes it default
escapeString: false,
printBasicPrototype: false,
},
restoreMocks: true,
unmockedModulePathPatterns: [],
setupFilesAfterEnv,
Expand Down

0 comments on commit e58b052

Please sign in to comment.