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', '^Docs/@types/types$': '/../sonar-docs/src/@types/types.d.ts', '^Docs/(.*)': '/../sonar-docs/src/$1' }, setupFiles: [ '/config/polyfills.ts', '/config/jest/SetupEnzyme.ts', '/config/jest/SetupTestEnvironment.ts' ], setupFilesAfterEnv: ['/config/jest/SetupReactTestingLibrary.ts'], snapshotSerializers: ['enzyme-to-json/serializer', 'jest-emotion'], testEnvironment: 'jsdom', testPathIgnorePatterns: ['/config', '/node_modules', '/scripts'], testRegex: '(/__tests__/.*|\\-test)\\.(ts|tsx|js)$', transform: { '^.+\\.tsx?$': [ '@swc/jest', { jsc: { target: 'es2018' } } ] }, 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 };