Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions packages/svelte-query/tests/createQuery.svelte.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1275,10 +1275,7 @@ describe('createQuery', () => {
// Prefetch the query
const prefetchPromise = queryClient.prefetchQuery({
queryKey: key,
queryFn: async () => {
await sleep(10)
return 'prefetch'
},
queryFn: () => sleep(10).then(() => 'prefetch'),
})
await vi.advanceTimersByTimeAsync(10)
await prefetchPromise
Expand Down Expand Up @@ -1518,10 +1515,7 @@ describe('createQuery', () => {
withEffectRoot(() => {
const key = ['test-key']

const queryFn = async () => {
await sleep(10)
return 'data1'
}
const queryFn = () => sleep(10).then(() => 'data1')

// Create two queries with the same key but different options
createQuery(
Expand Down
5 changes: 1 addition & 4 deletions packages/svelte-query/tests/useIsFetching/Query.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

const query = createQuery(() => ({
queryKey: ['test'],
queryFn: async () => {
await sleep(10)
return 'test'
},
queryFn: () => sleep(10).then(() => 'test'),
enabled: ready,
}))
</script>
Expand Down
5 changes: 1 addition & 4 deletions packages/svelte-query/tests/useIsMutating/Query.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

const mutation = createMutation(() => ({
mutationKey: ['mutation-1'],
mutationFn: async () => {
await sleep(10)
return 'data'
},
mutationFn: () => sleep(10).then(() => 'data'),
}))
</script>

Expand Down
Loading