Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code coverage] Update jest config to collect more data #83804

Merged
merged 6 commits into from
Nov 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/kbn-test/jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,14 @@ module.exports = {
'[/\\\\]node_modules(?![\\/\\\\]monaco-editor)[/\\\\].+\\.js$',
'packages/kbn-pm/dist/index.js',
],

// An array of regexp pattern strings that are matched against all source file paths, matched files to include/exclude for code coverage
collectCoverageFrom: [
'**/*.{js,mjs,jsx,ts,tsx}',
'!**/{__test__,__snapshots__,__examples__,mocks,tests,test_helpers,integration_tests,types}/**/*',
'!**/*mock*.ts',
'!**/*.test.ts',
'!**/*.d.ts',
'!**/index.{js,ts}',
],
};
12 changes: 0 additions & 12 deletions src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,5 @@ export default {
'<rootDir>/test/functional/services/remote',
'<rootDir>/src/dev/code_coverage/ingest_coverage',
],
collectCoverageFrom: [
'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',
'packages/kbn-ui-framework/src/services/**/*.js',
'!packages/kbn-ui-framework/src/services/index.js',
'!packages/kbn-ui-framework/src/services/**/*/index.js',
],
testRunner: 'jasmine2',
};