Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
TanStack
/
query
Pull requests
TanStack
query
Public
Synced with GitHub
Popular #6
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
test: startTransition
#8444
Send to my agent
Closed
TkDodo
wants to merge 2 commits into
main
from
refs/pull/8444/head
·
opened
2 years ago
View on GitHub
Conversation
3
Commits
2
Files changed
1
Impact
Showing
1 changed file
with
97 additions
and
0 deletions
.
x
0 of 1 viewed, 1 left
Files
Hide whitespace
Unified
Split
97 additions and 0 deletions
+97
-0
packages/react-query/src/__tests__/transition.test.tsx
Added
Diff
Before/After
Viewed
packages/react-query/src/__tests__/transition.test.tsx
View file
@@ -0,0 +1,97 @@
1
+
import
{ afterAll, beforeAll, describe, expect, it }
from
'vitest'
2
+
import
*
as
React
from
'react'
3
+
import
{
4
+
createRenderStream,
5
+
useTrackRenders,
6
+
}
from
'@testing-library/react-render-stream'
7
+
import
{
QueryClientProvider
, useQuery }
from
'..'
8
+
import
{
QueryCache
}
from
'../index'
9
+
import
{ createQueryClient, queryKey, sleep }
from
'./utils'
10
+
11
+
describe
(
'react transitions'
, () => {
12
+
const
queryCache =
new
QueryCache
()
13
+
const
queryClient =
createQueryClient
({
14
+
queryCache,
15
+
})
16
+
17
+
beforeAll
(() => {
18
+
queryClient.
setDefaultOptions
({
19
+
queries
: {
experimental_prefetchInRender
:
true
},
20
+
})
21
+
})
22
+
afterAll
(() => {
23
+
queryClient.
setDefaultOptions
({
24
+
queries
: {
experimental_prefetchInRender
:
false
},
25
+
})
26
+
})
27
+
Home
Search
Explore
Menu