Skip to content

Conversation

@dmlemeshko
Copy link
Member

@dmlemeshko dmlemeshko commented Nov 19, 2020

Summary

Code coverage for oss jest tests was collecting data only for files in src/plugins, so combined coverage for files with different path (e.g.src/core) was reported as 0%

Before

Code coverage report for src:core:public:overlays:banners:banners_service tsx 2020-11-19 15-05-55

After

Code coverage report for src:core:public:overlays:banners:banners_list tsx 2020-11-19 16-45-48

Combined jest report has slightly better numbers:

Before
Code coverage report for All files 2020-11-19 20-59-37
https://kibana-coverage.elastic.dev/2020-11-19T10:16:00Z/jest-combined/index.html

After
Code coverage report for All files 2020-11-19 20-59-10
https://kibana-coverage.elastic.dev/2020-11-19T16:04:07Z/jest-combined/index.html

@dmlemeshko dmlemeshko changed the title collect code coverage for more files in src [code coverage] Update jest config to collect more from src/ Nov 19, 2020
@dmlemeshko dmlemeshko added v8.0.0 v7.11.0 backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Nov 19, 2020
@dmlemeshko dmlemeshko marked this pull request as ready for review November 19, 2020 20:04
@dmlemeshko dmlemeshko requested a review from a team as a code owner November 19, 2020 20:04
@tylersmalley tylersmalley self-requested a review November 19, 2020 20:15
@tylersmalley
Copy link
Contributor

Any reason for not removing the specificity and instead using something like '**/*.{js,mjs,jsx,ts,tsx}',

@dmlemeshko
Copy link
Member Author

dmlemeshko commented Nov 20, 2020

Any reason for not removing the specificity and instead using something like '**/*.{js,mjs,jsx,ts,tsx}',

Hey @tylersmalley I was not sure if we really want to include every path, e.g.:

examples/

Code coverage report for All files 2020-11-20 12-08-49

and all the stuff under

packages
src/dev
src/legacy
src/setup_node_env 
src/test_utils

If you think that we should, I propose to go with the following template:

    '**/*.{js,mjs,jsx,ts,tsx}',
    '!**/{__test__,__snapshots__,__examples__,mocks,tests,test_helpers,integration_tests,types}/**/*',
    '!**/*mock*.ts',
    '!**/*.test.ts',
    '!**/*.d.ts',
    '!**/index.{js,ts}',

@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@dmlemeshko dmlemeshko changed the title [code coverage] Update jest config to collect more from src/ [code coverage] Update jest config to collect more data Nov 20, 2020
@dmlemeshko
Copy link
Member Author

Ready for review, code coverage pipeline started o verify: https://kibana-ci.elastic.co/job/elastic+kibana+qa-research/139/

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dmlemeshko dmlemeshko merged commit 312438f into elastic:master Nov 20, 2020
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Nov 20, 2020
* collect code coverage for more files in src/

* update config

* update config according review

* move collectCoverageFrom to preset

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	src/dev/jest/config.js
dmlemeshko added a commit that referenced this pull request Nov 21, 2020
)

* collect code coverage for more files in src/

* update config

* update config according review

* move collectCoverageFrom to preset

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	src/dev/jest/config.js
gmmorris added a commit to rudolf/kibana that referenced this pull request Nov 23, 2020
* master: (67 commits)
  [Observability] Load hasData call asynchronously (elastic#80644)
  Implement AnonymousAuthenticationProvider. (elastic#79985)
  Deprecate `visualization:colorMapping` advanced setting (elastic#83372)
  [TSVB] [Rollup] Table tab not working with rollup indexes (elastic#83635)
  Revert "[Search] Search batching using bfetch (elastic#83418)" (elastic#84037)
  skip flaky suite (elastic#83772)
  skip flaky suite (elastic#69849)
  create kbn-legacy-logging package (elastic#77678)
  [Search] Search batching using bfetch (elastic#83418)
  [Security Solution] Refactor Timeline flyout to take a full page (elastic#82033)
  Drop use of console-stamp (elastic#83922)
  skip flaky suite (elastic#84011 , elastic#84012)
  Fixed usage of `isReady` for usage collection of alerts and actions (elastic#83760)
  [maps] support URL drilldowns (elastic#83732)
  Revert "Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226)"
  [code coverage] Update jest config to collect more data (elastic#83804)
  Added default dedupKey value as an {{alertInstanceId}} to provide grouping functionality for PagerDuty incidents. (elastic#83226)
  [Security Solution] Give notice when endpoint policy is out of date (elastic#83469)
  [Security Solution] Sync url state on any changes to query string (elastic#83314)
  [CI] Initial TeamCity implementation (elastic#81043)
  ...
@dmlemeshko dmlemeshko deleted the update-jest-config branch January 31, 2022 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v7.11.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants