-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(react-query): use fake timer for HydrationBoundary.test.tsx #8774
test(react-query): use fake timer for HydrationBoundary.test.tsx #8774
Conversation
View your CI Pipeline Execution ↗ for commit 9fd6fbe.
☁️ Nx Cloud last updated this comment at |
2acf617
to
0308e17
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8774 +/- ##
===========================================
- Coverage 46.58% 32.83% -13.76%
===========================================
Files 200 5 -195
Lines 7573 67 -7506
Branches 1740 16 -1724
===========================================
- Hits 3528 22 -3506
+ Misses 3669 37 -3632
+ Partials 376 8 -368
🚀 New features to boost your workflow:
|
Array.from({ length: 1000 }).map(async (_, index) => { | ||
await vi.advanceTimersByTimeAsync(index) | ||
expect(hydrateSpy).toHaveBeenCalledTimes(0) | ||
}), | ||
) |
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.
what does this do?
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.
I wanted to test that hydrateSpy is not called over time.
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.
I think this is better
await vi.runAllTimersAsync()
expect(hydrateSpy).toHaveBeenCalledTimes(0)
…e-fake-timer-HydrationBoundary
No description provided.