Fix jest setup deprecation

This commit is contained in:
Johannes Zillmann 2024-04-02 18:19:20 -06:00
parent 182dd34c46
commit 16e5a62951

View File

@ -2,19 +2,11 @@ module.exports = {
preset: 'ts-jest', preset: 'ts-jest',
testEnvironment: 'node', testEnvironment: 'node',
roots: ['./test'], roots: ['./test'],
transform: { '\\.ts$': ['ts-jest'] },
testRegex: '(/test/.*|(\\.|/))(test)\\.(ts)$', testRegex: '(/test/.*|(\\.|/))(test)\\.(ts)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: { moduleNameMapper: {
'src/(.*)': '<rootDir>/src/$1', 'src/(.*)': '<rootDir>/src/$1',
'test/(.*)': '<rootDir>/test/$1', 'test/(.*)': '<rootDir>/test/$1',
}, },
globals: { transform: { '\\.ts$': ['ts-jest'] },
'ts-jest': {
tsconfig: {
// allow js in typescript
allowJs: true,
},
},
},
}; };