diff --git a/jest.preset.js b/jest.preset.js index acdbe4fd5e5a9..e2d2ec374cc36 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -24,6 +24,11 @@ const baseConfig = { cacheDirectory: '/node_modules/.cache/jest', clearMocks: true, watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], + // OLD format for migration to jest 29 - TODO: migrate to new format . https://jestjs.io/blog/2022/04/25/jest-28#future + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, }; module.exports = { ...baseConfig }; diff --git a/scripts/jest/src/jest.preset.v0.js b/scripts/jest/src/jest.preset.v0.js index 778fcdccc10f8..5d47d3e20b9f5 100644 --- a/scripts/jest/src/jest.preset.v0.js +++ b/scripts/jest/src/jest.preset.v0.js @@ -27,6 +27,11 @@ const createConfig = (/** @type {import('@jest/types').Config.InitialOptions} */ }), ...customConfig.moduleNameMapper, }, + // OLD format for migration to jest 29 - TODO: migrate to new format . https://jestjs.io/blog/2022/04/25/jest-28#future + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, }); module.exports = createConfig; diff --git a/scripts/jest/src/jest.preset.v8.js b/scripts/jest/src/jest.preset.v8.js index 843d5d736ee72..076866d9dec45 100644 --- a/scripts/jest/src/jest.preset.v8.js +++ b/scripts/jest/src/jest.preset.v8.js @@ -83,6 +83,11 @@ const createConfig = (customConfig = {}) => { clearMocks: true, watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], + // OLD format for migration to jest 29 - TODO: migrate to new format . https://jestjs.io/blog/2022/04/25/jest-28#future + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, }; return merge(defaultConfig, customConfig);