-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(coverage): add summary reporter #21535
Conversation
"---------------------------------- | ||
File | Branch % | Line % | | ||
---------------------------------- | ||
All files | 40.00 | 60.98 | |
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.
Does this output match one from any of the existing tools?
I'm thinking that maybe we could do something like this:
----------------------------------
File | Branch % | Line % |
----------------------------------
bar.ts | 0.00 | 57.14 |
baz/quux.ts | 0.00 | 28.57 |
baz/qux.ts | 100.00 | 100.00 |
foo.ts | 50.00 | 76.92 |
----------------------------------
All files | 40.00 | 60.98 |
----------------------------------
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.
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.
Probably one decimal place of precision would be enough. EG
----------------------------------
File | Branch % | Line % |
----------------------------------
bar.ts | 0.0 | 57.1 |
baz/quux.ts | 0.0 | 28.5 |
baz/qux.ts | 100.0 | 100.0 |
foo.ts | 50.0 | 76.2 |
----------------------------------
All files | 40.0 | 60.9 |
----------------------------------
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.
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.
LGTM
This PR adds 'summary' reporter to
deno coverage
command. The reporter shows the coverage report in the terminal like the below:This change also makes this output format default of
deno coverage
. The existing default output (PrettyCoverageReporter) is now available via--pretty
flag. (@bartlomieju and I discussed about this default behavior change offline).part of #21325