File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @jest -environment node
3+ */
4+
15import { cleanup } from '@testing-library/react'
26import React from 'react'
37import { renderToString } from 'react-dom/server'
8+ import { usePaginatedQuery , queryCache } from '../index'
49
510describe ( 'useQuery SSR' , ( ) => {
6- beforeEach ( ( ) => {
7- const windowSpy = jest . spyOn ( global , 'window' , 'get' )
8- windowSpy . mockImplementation ( ( ) => undefined )
9- } )
10-
1111 afterEach ( ( ) => {
1212 cleanup ( )
1313 } )
1414
1515 // See https://github.com/tannerlinsley/react-query/issues/70
1616 it ( 'should not cache queries on server' , async ( ) => {
17- // import react-query after mocking window
18- const { usePaginatedQuery, queryCache } = require ( '../index' )
19-
2017 function Page ( ) {
2118 const [ page , setPage ] = React . useState ( 1 )
2219 const { resolvedData } = usePaginatedQuery (
You can’t perform that action at this time.
0 commit comments