Skip to content

Commit

Permalink
ci: apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 19, 2024
1 parent cfdf512 commit 174c1c7
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions packages/react-query/src/__tests__/transition.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { afterAll, beforeAll, describe, expect, it, } from 'vitest'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
import * as React from 'react'
import {
createRenderStream,
Expand All @@ -17,7 +17,6 @@ afterAll(() => {
disableActReturn.cleanup()
})


describe('react transitions', () => {
const queryCache = new QueryCache()
const queryClient = createQueryClient({
Expand Down Expand Up @@ -115,8 +114,6 @@ describe('react transitions', () => {

let deferredA = createDeferred<void>()
let deferredB = createDeferred<void>()



function ComponentA(props: { parentId: number }) {
useTrackRenders()
Expand Down Expand Up @@ -154,8 +151,6 @@ describe('react transitions', () => {
staleTime: 1000,
})



const data = React.use(query.promise)

console.log('render B', data)
Expand Down Expand Up @@ -186,7 +181,6 @@ describe('react transitions', () => {
)
}


const rendered = await renderStream.render(
<QueryClientProvider client={queryClient}>
<Parent />
Expand All @@ -196,7 +190,11 @@ describe('react transitions', () => {
const { renderedComponents, withinDOM } = await renderStream.takeRender()
withinDOM().getByText('A loading..')
withinDOM().getByText('B loading..')
expect(renderedComponents).toEqual([Parent, ComponentBLoading, ComponentALoading])
expect(renderedComponents).toEqual([
Parent,
ComponentBLoading,
ComponentALoading,
])
}

deferredA.resolve()
Expand All @@ -220,6 +218,5 @@ describe('react transitions', () => {
withinDOM().getByText('B data: B-1')
expect(renderedComponents).toEqual([Parent, ComponentB, ComponentA])
}

})
})

0 comments on commit 174c1c7

Please sign in to comment.