Files
zitadel/apps/login/jest.config.ts
Elio Bischof 32bdddfb2a cleanup
2023-06-06 00:38:09 +02:00

22 lines
761 B
TypeScript

import type { Config } from '@jest/types';
import { pathsToModuleNameMapper } from 'ts-jest'
import { compilerOptions } from './tsconfig.json';
export default async (): Promise<Config.InitialOptions> => {
return {
preset: 'ts-jest',
transform: {
"^.+\\.tsx?$": ['ts-jest', {tsconfig:'./__test__/tsconfig.json'}],
},
setupFilesAfterEnv: [
'@testing-library/jest-dom/extend-expect',
],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix:'<rootDir>/'
}),
testEnvironment: 'jsdom',
testRegex: '/__test__/.*\\.test\\.tsx?$',
modulePathIgnorePatterns: ['cypress'],
reporters: [[ 'jest-silent-reporter', { useDots: true, showWarnings: true, showPaths: true } ], 'summary']
};
};