/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import { RESERVED_DIR_JEST_INTEGRATION_TESTS } from '../../../src/dev/constants'; export default { rootDir: '../../', roots: [ '/legacy/plugins', '/legacy/server', '/legacy/common', '/test_utils/jest/integration_tests', ], collectCoverageFrom: [ 'legacy/plugins/**/*.js', 'legacy/common/**/*.js', 'legacy/server/**/*.js', ], moduleNameMapper: { '^ui/(.*)': '**/public/$1', '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '/src/dev/jest/mocks/file_mock.js', '\\.(css|less|scss)$': '/../src/dev/jest/mocks/style_mock.js', }, setupFiles: [ '/../src/dev/jest/setup/babel_polyfill.js', '/../src/dev/jest/setup/polyfills.js', '/../src/dev/jest/setup/enzyme.js', ], coverageDirectory: '/../target/jest-coverage', coverageReporters: [ 'html', ], moduleFileExtensions: [ 'js', 'json', 'ts', 'tsx', ], modulePathIgnorePatterns: [ '__fixtures__/', 'target/', ], testMatch: [ '**/*.test.{js,ts,tsx}' ], testPathIgnorePatterns: [ '/packages/kbn-ui-framework/(dist|doc_site|generator-kui)/', '/packages/kbn-pm/dist/', `${RESERVED_DIR_JEST_INTEGRATION_TESTS}/`, ], transform: { '^.+\\.(js|tsx?)$': '/../src/dev/jest/babel_transform.js', '^.+\\.txt?$': 'jest-raw-loader', '^.+\\.html?$': 'jest-raw-loader', }, transformIgnorePatterns: [ '[/\\\\]node_modules[/\\\\].+\\.js$', 'packages/kbn-pm/dist/index.js' ], snapshotSerializers: [ '/../node_modules/enzyme-to-json/serializer', ], reporters: [ 'default', '/../src/dev/jest/junit_reporter.js', ], };