Skip to content

test(query-core): add test case for hydration #8949

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

Merged
merged 16 commits into from
Apr 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reflect feedback
  • Loading branch information
minseong0324 committed Apr 8, 2025
commit 3ab87c9dc9aa1ce7dfb4d98d59c366a319a4de1a
7 changes: 1 addition & 6 deletions packages/query-core/src/__tests__/hydration.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1169,12 +1169,7 @@ describe('dehydration and rehydration', () => {

expect(dehydrated.queries[0]?.promise).toBeInstanceOf(Promise)

try {
await dehydrated.queries[0]?.promise
expect(true).toBe(false)
} catch (error) {
expect(error).toBe(testError)
}
await expect(dehydrated.queries[0]?.promise).rejects.toBe(testError)

await promise
queryClient.clear()
Expand Down
Loading