-
Notifications
You must be signed in to change notification settings - Fork 634
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(testing): improve FakeTime
testing
#5123
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5123 +/- ##
==========================================
+ Coverage 92.74% 92.78% +0.04%
==========================================
Files 480 480
Lines 38337 38337
Branches 5396 5400 +4
==========================================
+ Hits 35555 35572 +17
+ Misses 2726 2710 -16
+ Partials 56 55 -1 ☔ 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.
Great work! Some nits. This also makes me realize we can improve the error types and messages thrown in @std/testing/time
. However, that's best handled in a follow-up PR.
() => { | ||
time.now = 999; | ||
}, | ||
Error, |
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.
Not for this PR, but we should throw RangeError
.
This PR improves test line coverage of
testing/time.ts
from 85.22% to 93.08% (The missed lines are reduced from 57 to 22)part of #3713