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

Don't use babel when running tests using karma #398

Merged
merged 1 commit into from
May 15, 2019
Merged

Conversation

foolip
Copy link
Member

@foolip foolip commented May 14, 2019

Currently instrumentation is running after babel, which results in
incorrect and nonsensical coverage information. The node vs. web
coverage here is an example:
https://codecov.io/gh/GoogleChromeLabs/confluence/src/f6802df5a6be89042a1db1e7b82f0a0a90906caf/lib/dao/indexed_dao.es6.js

This could be fixed by changing the order:
#404

However, it's not clear if that's correct:
webpack-contrib/istanbul-instrumenter-loader#86

There's no need to run Babel to test stable versions of Chrome or Firefox,
so just skip babel-loader.

@codecov-io
Copy link

codecov-io commented May 14, 2019

Codecov Report

Merging #398 into master will decrease coverage by 7.06%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #398      +/-   ##
==========================================
- Coverage   60.77%   53.71%   -7.07%     
==========================================
  Files          54       54              
  Lines        2904     1670    -1234     
==========================================
- Hits         1765      897     -868     
+ Misses       1139      773     -366
Flag Coverage Δ
#node 73.74% <ø> (ø) ⬆️
#web 55.16% <ø> (-0.4%) ⬇️
Impacted Files Coverage Δ
lib/property.es6.js 50% <0%> (-16.67%) ⬇️
lib/u2/DAOController.es6.js 6.25% <0%> (-12.8%) ⬇️
lib/dao/indexed_dao.es6.js 60% <0%> (-8.43%) ⬇️
lib/web_apis/release.es6.js 41.66% <0%> (-8.34%) ⬇️
lib/object.es6.js 9.09% <0%> (-7.58%) ⬇️
lib/dao/local_json_dao.es6.js 12.5% <0%> (-7.02%) ⬇️
lib/u2/ScrollDAOTable.es6.js 4.34% <0%> (-6.18%) ⬇️
lib/client/state.es6.js 10.34% <0%> (-5.45%) ⬇️
lib/client/api_service.es6.js 29.72% <0%> (-5.28%) ⬇️
lib/confluence/metric_computer_runner.es6.js 75.38% <0%> (-5.27%) ⬇️
... and 37 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6802df...dae38f1. Read the comment docs.

Copy link
Member Author

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review because this is a subset of #395 already approved by @Hexcles

Doing so affects the coverage.
@foolip
Copy link
Member Author

foolip commented May 15, 2019

webpack-contrib/istanbul-instrumenter-loader#86 is an issue about this that I think is related to the problem.

@foolip foolip merged commit f31562a into master May 15, 2019
@foolip foolip deleted the coverage-sans-babel branch May 15, 2019 12:20
@foolip
Copy link
Member Author

foolip commented May 15, 2019

The change in coverage is of course because of the semi-random offsets of line coverage before, which would incorrectly increase line coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants