-
Notifications
You must be signed in to change notification settings - Fork 621
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
test(internal): improve test coverage #4779
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4779 +/- ##
==========================================
- Coverage 91.88% 91.72% -0.17%
==========================================
Files 486 486
Lines 41337 41325 -12
Branches 5325 5294 -31
==========================================
- Hits 37984 37905 -79
- Misses 3296 3357 +61
- Partials 57 63 +6 ☔ View full report in Codecov by Sentry. |
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.
@iuioiua i would be really keen to get your feedback on this one.
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.
Excellent work so far. This is great.
internal/build_message.ts
Outdated
@@ -112,3 +111,9 @@ export function buildMessage( | |||
messages.push(...(stringDiff ? [diffMessages.join("")] : diffMessages), ""); | |||
return messages; | |||
} | |||
|
|||
/** Used internally for testing. */ | |||
export const _internals = { |
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.
Let's export these functions instead of putting them in these _internals
objects. It'll be much cleaner. Ditto for the other files in this package. This is fine to do here as this is purely an internal package. You'll have to add @example
tags to the newly exported symbols to make the doc checker (deno task lint:docs
) too.
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.
gotcha!
for some reason i was unsure if we would ever want to export the other functions in this package.
implemented as suggested.
love the way how the doc checker works bth!
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.
Are you able to fix the functions in this file too?
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.
oh... i'm so sorry.
cleanup for build_message
is done as well.
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.
Looking better.
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.
Thank you very much for this. We should discuss and explore options for hitting that colors code.
working towards #3713.
pushes code coverage of the
internal
sub-module closer to 100%.the only file missing is
internal/styles.ts
, which is vendored fromfmt/colors.ts
.added a test case for
noColor
, yet that doesn't seem to be sufficient to appease codecov.