-
Notifications
You must be signed in to change notification settings - Fork 655
refactor(cli/unstable): use Date.now()
internally and use FakeTime
for testing
#6686
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6686 +/- ##
=======================================
Coverage 94.70% 94.70%
=======================================
Files 567 567
Lines 46789 46789
Branches 6582 6582
=======================================
Hits 44310 44310
Misses 2437 2437
Partials 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Since your expected results changes based on execution time, you can't have a static expected output. You're going to need something more flexible to confirm the results of the output or it will continue to appear flaky at times. |
I updated the |
setData()
Date.now()
internally and use FakeTime
for testing
@kt3k Funnily enough there seems to be a flaky fs/renameSync test that fails here... |
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
Ref: #6684
Seems like the random delay in
setData()
could lead to tests being flaky.This PR removes the function altogether and adds additional tests.