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',
testEnvironment: 'node',
roots: ['./test'],
transform: { '\\.ts$': ['ts-jest'] },
testRegex: '(/test/.*|(\\.|/))(test)\\.(ts)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'src/(.*)': '<rootDir>/src/$1',
'test/(.*)': '<rootDir>/test/$1',
},
globals: {
'ts-jest': {
tsconfig: {
// allow js in typescript
allowJs: true,
},
},
},
transform: { '\\.ts$': ['ts-jest'] },
};