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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to nyc, babel-plugin-istanbul & codecov-node for code coverage #4740
Conversation
This setup (very much like Babylon's) let us trace code coverage back to the `src/` directories of packages.
Current coverage is 89.95% (diff: 100%)@@ master #4740 diff @@
==========================================
Files 196 196
Lines 13784 10227 -3557
Methods 1434 1122 -312
Messages 0 0
Branches 3199 2691 -508
==========================================
- Hits 12312 9200 -3112
+ Misses 1472 1027 -445
Partials 0 0
|
The only big problem that we have then (and we currently also have in babylon) is that not all files show up in the reports. Only the files that are required at least once. |
@danez Oh. I think I knew about that problem and then forgot about it. Gonna have a look. |
Just a quick update - I'm doing some work on |
@motiz88 @danez @hzoo, we've landed changes to This is currently published to the
My configuration and test-script look like this, in the testing project I've been using:
{"babel": {
"presets": [
"es2015"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
}
}
},
"nyc": {
"include": [
"src/**/*.js"
],
"exclude": [
"node_modules"
],
"require": [
"babel-register"
],
"sourceMap": false,
"instrument": false
}} Thanks for everyone's help and feedback regarding this feature; it will be awesome to babel using |
Merged this via #4885 |
The key benefit of this setup, apart from using the newer tools (same as Babylon has used for a while) is that coverage is now referenced to
src/
rather thanlib/
, so the correct source shows up on Codecov, hopefully getting us to #1851 faster 馃槈Thanks @bcoe for releasing istanbuljs-archived-repos/istanbul-lib-instrument#26 so quickly!
As I've mentioned on Slack - this currently causes a double build on CI, once during
make bootstrap
and once duringmake test-cov
. This is not ideal and I'm hoping someone can weigh in on whether we need to build inmake bootstrap
at all.