This commit is contained in:
Elio Bischof
2023-06-05 13:02:36 +02:00
parent c71046dc66
commit 4ca1d60f0f
38 changed files with 10214 additions and 226 deletions

View File

@@ -1,8 +1,19 @@
import type { JestConfigWithTsJest } from 'ts-jest'
import type { Config } from '@jest/types';
const jestConfig: JestConfigWithTsJest = {
preset: 'ts-jest',
testEnvironment: 'node'
}
export default jestConfig
export default async (): Promise<Config.InitialOptions> => {
return {
preset: 'ts-jest',
transform: {
"^.+\\.tsx?$": ['ts-jest', { tsconfig: 'tsconfig.test.json' }],
},
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect',
'<rootDir>/jest-setup.ts',
],
moduleNameMapper: {
'^#/(.*)$': '<rootDir>/$1',
},
testEnvironment: 'jsdom',
clearMocks: true,
};
};