Skip to content

Commit

Permalink
feat: add 'jest-snapshot-serializer-raw/always' as default snapshotSe…
Browse files Browse the repository at this point in the history
…rializer (#206)

BREAKING CHANGE: snapshots will now be serialized by 'jest-snapshot-serializer-raw/always'
  • Loading branch information
MichaelDeBoey authored Apr 26, 2021
1 parent 17ddc27 commit 78611f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 0 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@ const {jest} = require('./src/config')
module.exports = {
...jest,
coverageThreshold: null,
snapshotSerializers: [
...jest.snapshotSerializers,
'jest-snapshot-serializer-raw/always',
],
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"is-ci": "^3.0.0",
"jest": "^26.6.3",
"jest-serializer-path": "^0.1.15",
"jest-snapshot-serializer-raw": "^1.2.0",
"jest-watch-typeahead": "^0.6.2",
"lint-staged": "^10.5.4",
"lodash.camelcase": "^4.3.0",
Expand Down Expand Up @@ -117,7 +118,6 @@
"homepage": "https://github.com/kentcdodds/kcd-scripts#readme",
"devDependencies": {
"jest-in-case": "^1.0.2",
"jest-snapshot-serializer-raw": "^1.2.0",
"slash": "^3.0.0"
}
}
5 changes: 4 additions & 1 deletion src/config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const jestConfig = {
require.resolve('jest-watch-typeahead/filename'),
require.resolve('jest-watch-typeahead/testname'),
],
snapshotSerializers: [require.resolve('jest-serializer-path')],
snapshotSerializers: [
require.resolve('jest-serializer-path'),
require.resolve('jest-snapshot-serializer-raw/always'),
],
}

const setupFiles = [
Expand Down

0 comments on commit 78611f1

Please sign in to comment.