module.exports = { coverageDirectory: '/coverage', collectCoverageFrom: ['src/main/js/**/*.{ts,tsx,js}', '!helpers/{keycodes,testUtils}.{ts,tsx}'], coverageReporters: ['lcovonly', 'text'], globals: { 'ts-jest': { diagnostics: false, }, }, moduleFileExtensions: ['ts', 'tsx', 'js', 'json'], moduleNameMapper: { '^.+\\.(md|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/config/jest/FileStub.js', '^.+\\.css$': '/config/jest/CSSStub.js', }, setupFiles: [ '/config/polyfills.ts', '/config/jest/SetupEnzyme.ts', '/config/jest/SetupTestEnvironment.ts', ], setupFilesAfterEnv: ['/config/jest/SetupReactTestingLibrary.ts'], snapshotSerializers: ['enzyme-to-json/serializer', '@emotion/jest/serializer'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/config', '/node_modules', '/scripts'], testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$', transform: { '^.+\\.(t|j)sx?$': [ '@swc/jest', { jsc: { target: 'es2018', }, }, ], }, transformIgnorePatterns: ['/node_modules/(?!(d3-.+))/'], reporters: [ 'default', [ 'jest-junit', { outputDirectory: 'build/test-results/test-jest', outputName: 'junit.xml', ancestorSeparator: ' > ', suiteNameTemplate: '{filename}', classNameTemplate: '{classname}', titleTemplate: '{title}', }, ], [ './config/jest/ElasticSearchReporter.js', { outputFilepath: '/tmp/ut-ts-web-monitoring.log', }, ], ], testTimeout: 30000, };