-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
test(react-query/usePrefetchQuery): use precise time in 'advanceTimersByTimeAsync', and add 'expect' using 'toBeInTheDocument' #9448
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
View your CI Pipeline Execution ↗ for commit c55ea51
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9448 +/- ##
===========================================
+ Coverage 45.30% 84.38% +39.07%
===========================================
Files 208 26 -182
Lines 8283 365 -7918
Branches 1864 108 -1756
===========================================
- Hits 3753 308 -3445
+ Misses 4085 48 -4037
+ Partials 445 9 -436 🚀 New features to boost your workflow:
|
…sByTimeAsync', and add 'expect' using 'toBeInTheDocument'
c586786
to
0a69c0d
Compare
…-using-toBeInTheDocument
@@ -167,8 +169,8 @@ describe('usePrefetchQuery', () => { | |||
} | |||
|
|||
const rendered = renderWithClient(queryClient, <App />) | |||
await act(() => vi.advanceTimersByTimeAsync(11)) | |||
rendered.getByText('data: prefetchedQuery') | |||
await act(() => vi.advanceTimersByTimeAsync(10)) |
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.
👍
@@ -72,8 +72,8 @@ describe('usePrefetchQuery', () => { | |||
|
|||
const rendered = renderWithClient(queryClient, <App />) | |||
|
|||
await act(() => vi.advanceTimersByTimeAsync(11)) | |||
rendered.getByText('data: prefetchQuery') | |||
await act(() => vi.advanceTimersByTimeAsync(10)) |
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.
tight 👍
No description provided.