Skip to content

Commit

Permalink
Forgot to remove test that should not be merged
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderArvidsson committed Jan 30, 2022
1 parent dbb888a commit 8151c8c
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions packages/toolkit/src/query/tests/cleanup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,6 @@ test('data is removed from store after 60 seconds', async () => {
expect(getSubStateA()).toBeUndefined()
})

test('data is removed from store if refetch without active subscribers', async () => {
expect(getSubStateA()).toBeUndefined()

const { unmount } = render(<UsingA />, { wrapper: storeRef.wrapper })
await waitFor(() =>
expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled)
)

unmount()

jest.advanceTimersByTime(20000)

expect(getSubStateA()?.status).toBe(QueryStatus.fulfilled)

await storeRef.store.dispatch(api.endpoints.a.initiate())

jest.advanceTimersByTime(2000)

console.log(storeRef.store.getState())
expect(getSubStateA()).toBeUndefined()
})

test('data stays in store when component stays rendered while data for another component is removed after it unmounted', async () => {
expect(getSubStateA()).toBeUndefined()
expect(getSubStateB()).toBeUndefined()
Expand Down

0 comments on commit 8151c8c

Please sign in to comment.