-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 with babel istanbul #4649
Conversation
c83c331
to
c68223c
Compare
hey @unlikelyzero , I see you approved. Are you okay with it not covering Vue code? Also I need to rebase this once both eslint PRs are merged. Then we can see if it'll pass. |
Yea that's fine for now |
Still needed in light of using code cov? |
@trusktr Please resolve conflicts. Also, @unlikelyzero , @nikhilmandlik , @trusktr Do we still need this? Discuss and close as needed. |
8be8493
to
1c6e69f
Compare
Codecov Report
@@ Coverage Diff @@
## master #4649 +/- ##
==========================================
+ Coverage 50.36% 50.44% +0.08%
==========================================
Files 510 511 +1
Lines 18657 18665 +8
Branches 1657 1644 -13
==========================================
+ Hits 9396 9415 +19
+ Misses 8847 8835 -12
- Partials 414 415 +1
Continue to review full report at Codecov.
|
1c6e69f
to
4a4bc10
Compare
…n dependencies, remove istanbul-instrumenter-loader
I was unable to get instrumentation into the JS expressions inside |
@trusktr @unlikelyzero can you guys get together on this one? |
…k to issue to enable coverage in Vue <template>s
Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/2025319708 |
1 similar comment
Started e2e Run. Follow along: https://github.com/nasa/openmct/actions/runs/2025319708 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did a virtual walkthrough of the changes and potential impacts downstream.
Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/2025319708 |
Success ✅ ! Build artifacts are here: https://github.com/nasa/openmct/actions/runs/2025319708 |
Closes
Describe your changes:
replaces instanbul-intrumenter-loader with babel-plugin-istanbul. Vue
<script>
s are now covered, but not expressions in<template>
The previous instanbul-intrumenter-loader is outdated and abandoned with old Babel dependencies, so as our tooling progresses, it will be incompatible, and it crashes on any new syntax that all modern browsers already support without compiling or poyfilling those features.
This updates to use babel-plugin-istanbul which is maintained, so that it will stay up to date with Babel and latest syntaxes.
This also moves the converage instrumentation webpack config out of karma config into a separate webpack.coverage.js file, which can enable our other test environments besides Karma to also use it (not part of this PR).
All Submissions:
Author Checklist
To test: run
npm run build:coverage
and verify that the output indist
has coverage instrumentation (you'll see weird statements injected all over the JS code, but if you see only your plain JS code and nothing strange, then it didn't work).Reviewer Checklist