diff --git a/jest.config.js b/jest.config.js index 4e778dff..17bc85ab 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,8 +3,4 @@ const {jest} = require('./src/config') module.exports = { ...jest, coverageThreshold: null, - snapshotSerializers: [ - ...jest.snapshotSerializers, - 'jest-snapshot-serializer-raw/always', - ], } diff --git a/package.json b/package.json index 044f50dc..6541af47 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } } diff --git a/src/config/jest.config.js b/src/config/jest.config.js index a628aa80..8548f4fa 100644 --- a/src/config/jest.config.js +++ b/src/config/jest.config.js @@ -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 = [