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
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ describe('injectQuery', () => {

expect(spy).toHaveBeenCalledTimes(2)
// should call queryFn with context containing the new queryKey
expect(spy).toHaveBeenCalledWith({
expect(spy).toHaveBeenNthCalledWith(2, {
client: queryClient,
meta: undefined,
queryKey: key2,
Expand Down Expand Up @@ -528,7 +528,8 @@ describe('injectQuery', () => {

void query.refetch().then(() => {
expect(fetchFn).toHaveBeenCalledTimes(1)
expect(fetchFn).toHaveBeenCalledWith(
expect(fetchFn).toHaveBeenNthCalledWith(
1,
expect.objectContaining({
queryKey: [...key, 'key11'],
}),
Expand All @@ -541,7 +542,8 @@ describe('injectQuery', () => {

void query.refetch().then(() => {
expect(fetchFn).toHaveBeenCalledTimes(2)
expect(fetchFn).toHaveBeenCalledWith(
expect(fetchFn).toHaveBeenNthCalledWith(
2,
expect.objectContaining({
queryKey: [...key, 'key12'],
}),
Expand Down
6 changes: 4 additions & 2 deletions packages/vue-query/src/__tests__/useQuery.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ describe('useQuery', () => {
expect(fetchFn).not.toHaveBeenCalled()
await query.refetch()
expect(fetchFn).toHaveBeenCalledTimes(1)
expect(fetchFn).toHaveBeenCalledWith(
expect(fetchFn).toHaveBeenNthCalledWith(
1,
expect.objectContaining({
queryKey: [...key, 'key11'],
}),
Expand All @@ -341,7 +342,8 @@ describe('useQuery', () => {
keyRef.value = 'key12'
await query.refetch()
expect(fetchFn).toHaveBeenCalledTimes(2)
expect(fetchFn).toHaveBeenCalledWith(
expect(fetchFn).toHaveBeenNthCalledWith(
2,
expect.objectContaining({
queryKey: [...key, 'key12'],
}),
Expand Down
Loading