From 5a3bd1de63d57d69d602cced3ee8761b0a93d2de Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Mon, 29 Jun 2020 15:47:05 +0200 Subject: [PATCH] [code coverage] exclude folders: test_helpers, tests_bundle --- src/dev/jest/config.js | 2 ++ x-pack/dev-tools/jest/create_jest_config.js | 1 + 2 files changed, 3 insertions(+) diff --git a/src/dev/jest/config.js b/src/dev/jest/config.js index 18fc7ebaa2af44..da343aa0f0672d 100644 --- a/src/dev/jest/config.js +++ b/src/dev/jest/config.js @@ -43,6 +43,7 @@ export default { 'src/plugins/**/*.{ts,tsx}', '!src/plugins/**/{__test__,__snapshots__,__examples__,mocks,tests}/**/*', '!src/plugins/**/*.d.ts', + '!src/plugins/**/test_helpers/**', 'packages/kbn-ui-framework/src/components/**/*.js', '!packages/kbn-ui-framework/src/components/index.js', '!packages/kbn-ui-framework/src/components/**/*/index.js', @@ -51,6 +52,7 @@ export default { '!packages/kbn-ui-framework/src/services/**/*/index.js', 'src/legacy/core_plugins/**/*.{js,jsx,ts,tsx}', '!src/legacy/core_plugins/**/{__test__,__snapshots__}/**/*', + '!src/legacy/core_plugins/tests_bundle/**', ], moduleNameMapper: { '@elastic/eui$': '/node_modules/@elastic/eui/test-env', diff --git a/x-pack/dev-tools/jest/create_jest_config.js b/x-pack/dev-tools/jest/create_jest_config.js index 5e0062fc3a6c67..9b6db8b74458b5 100644 --- a/x-pack/dev-tools/jest/create_jest_config.js +++ b/x-pack/dev-tools/jest/create_jest_config.js @@ -44,6 +44,7 @@ export function createJestConfig({ kibanaDirectory, rootDir, xPackKibanaDirector '!**/mocks/**', '!**/plugins/apm/e2e/**', '!**/plugins/siem/cypress/**', + '!**/plugins/**/test_helpers/**', ], coveragePathIgnorePatterns: ['.*\\.d\\.ts'], coverageDirectory: `${kibanaDirectory}/target/kibana-coverage/jest`,