diff --git a/src/__tests__/useQuery-test.tsx b/src/__tests__/useQuery-test.tsx index 5163cb3..9acf5bf 100644 --- a/src/__tests__/useQuery-test.tsx +++ b/src/__tests__/useQuery-test.tsx @@ -118,7 +118,11 @@ function Tasks({ query, ...options }: TasksProps) { return <>{error.message}; } - if (loading) { + if (loading && data.tasks) { + return <>Loading without suspense and with stale data; + } + + if (loading && !data.tasks) { return <>Loading without suspense; } @@ -325,7 +329,7 @@ it('should support updating query variables without suspense', async () => { expect(container).toMatchInlineSnapshot(`
- Loading without suspense + Loading without suspense and stale data
`);