Skip to content

Use Istanbul instrumentation for unittestcli code coverage#21189

Merged
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:issue21185
Apr 29, 2026
Merged

Use Istanbul instrumentation for unittestcli code coverage#21189
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:issue21185

Conversation

@calixteman
Copy link
Copy Markdown
Contributor

No description provided.

@calixteman
Copy link
Copy Markdown
Contributor Author

It's slightly faster with Istanbul and it aligns with unittest.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.18%. Comparing base (08eca52) to head (47f0bdc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21189      +/-   ##
==========================================
- Coverage   63.94%   56.18%   -7.76%     
==========================================
  Files         213      213              
  Lines      134597    67223   -67374     
  Branches        0    14519   +14519     
==========================================
- Hits        86064    37771   -48293     
+ Misses      48533    29452   -19081     
Flag Coverage Δ
fonttest 8.66% <ø> (?)
unittest 56.29% <ø> (-0.02%) ⬇️
unittestcli 54.89% <ø> (-8.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Looks good! It's more consistent between test targets, slightly faster and now results in similar numbers between unittestcli and unittest. The numbers also seem more realistic because looking at e.g. https://app.codecov.io/gh/mozilla/pdf.js/pull/21189/blob/src/core/brotli_stream.js?dropdown=coverage it's now correctly reported as 0% covered because we don't have any unit tests for this, while previously it'd be almost 40% (see https://app.codecov.io/gh/mozilla/pdf.js/blob/master/src%2Fcore%2Fbrotli_stream.js) purely because we imported the file somewhere and "accidentally" hit comments/imports and the like. I thus think the new state represents the real functional coverage better too.

Feel free to merge this if @Snuffleupagus agrees too.

Copy link
Copy Markdown
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

Maybe we should just skip running coverage in Windows/Chrome, since that combination appears to be slower and thus it's failing intermittently.

r=me, thanks.

@calixteman calixteman merged commit 0c5eaee into mozilla:master Apr 29, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coverage differences between unittestcli and unittest

4 participants