Skip to content

Commit 0059995

Browse files
committed
chore(jest.config): update config for jest 29
1 parent 6ae0c73 commit 0059995

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module.exports = {
22
preset: 'ts-jest',
3-
globals: {
4-
'ts-jest': {
5-
tsconfig: '<rootDir>/tsconfig.json',
6-
diagnostics: false,
7-
},
8-
},
9-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
103
transform: {
11-
'^.+\\.ts$': 'ts-jest',
4+
'\\.ts$': [
5+
'ts-jest',
6+
{
7+
tsconfig: '<rootDir>/tsconfig.json',
8+
diagnostics: true,
9+
},
10+
],
1211
},
12+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
1313
roots: ['<rootDir>/src'],
1414
testPathIgnorePatterns: ['/node_modules/', '/lib/'],
1515
testMatch: ['**/__tests__/**/*.test.(ts|js)'],
@@ -19,4 +19,8 @@ module.exports = {
1919
'!<rootDir>/src/util/postinstallHelper.ts', // exclude this file, because it is only made for postInstall, not tests
2020
],
2121
globalSetup: '<rootDir>/src/__tests__/testUtils/globalSetup.ts',
22+
snapshotFormat: {
23+
escapeString: true,
24+
printBasicPrototype: true,
25+
},
2226
};

0 commit comments

Comments
 (0)