We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c808fbc commit ff2076bCopy full SHA for ff2076b
test/basic.test.ts
@@ -51,12 +51,11 @@ describe('useQuery()', async () => {
51
const name = ref<string | undefined>(undefined)
52
const pong = trpc.hello.useQuery(() => (name.value ? { name: name.value } : skipToken))
53
54
- expect(pong.fetchStatus.value).toStrictEqual('fetching')
55
- await vi.waitUntil(() => pong.fetchStatus.value === 'idle')
+ expect(pong.fetchStatus.value).toStrictEqual('idle')
56
expect(pong.data.value).toBeUndefined()
57
58
name.value = 'World'
59
- expect(pong.status.value).toStrictEqual('error')
+ expect(pong.status.value).toStrictEqual('pending')
60
await vi.waitUntil(() => pong.status.value === 'success')
61
62
expect(pong.data.value).toStrictEqual('Hello World!')
0 commit comments