Skip to content

Commit

Permalink
[coverage] Improve stability and report stats (#86449)
Browse files Browse the repository at this point in the history
* improve reporting

* ignore failing tests
  • Loading branch information
dmlemeshko committed Dec 18, 2020
1 parent e65c533 commit 899f4dd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-test/jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = {
// 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}/**/*',
'!**/{__test__,__snapshots__,__examples__,*mock*,tests,test_helpers,integration_tests,types}/**/*',
'!**/*mock*.ts',
'!**/*.test.ts',
'!**/*.d.ts',
Expand Down
2 changes: 1 addition & 1 deletion src/dev/code_coverage/nyc_config/nyc.functional.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

const defaultExclude = require('@istanbuljs/schema/default-exclude');
const extraExclude = ['data/optimize/**', 'src/core/server/**', '**/test/**'];
const extraExclude = ['data/optimize/**', 'src/core/server/**', '**/{test, types}/**/*'];
const path = require('path');

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/jenkins_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if [[ -z "$CODE_COVERAGE" ]] ; then
./test/scripts/checks/test_hardening.sh
else
echo " -> Running jest tests with coverage"
node scripts/jest --ci --verbose --coverage --config jest.config.oss.js
node scripts/jest --ci --verbose --coverage --config jest.config.oss.js || true;
rename_coverage_file "oss"
echo ""
echo ""
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/jenkins_xpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ else
node ./x-pack/plugins/canvas/scripts/shareable_runtime
echo " -> Running jest tests with coverage"
cd x-pack
node --max-old-space-size=6144 scripts/jest --ci --verbose --maxWorkers=5 --coverage --config jest.config.js
node --max-old-space-size=6144 scripts/jest --ci --verbose --maxWorkers=5 --coverage --config jest.config.js || true;
# rename file in order to be unique one
test -f ../target/kibana-coverage/jest/coverage-final.json \
&& mv ../target/kibana-coverage/jest/coverage-final.json \
Expand Down

0 comments on commit 899f4dd

Please sign in to comment.