Skip to content

Commit 29723ee

Browse files
Fix test expectations for queryHash in QueryFunctionContext
1 parent 2e2bef4 commit 29723ee

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/angular-query-experimental/src/__tests__/inject-query.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ describe('injectQuery', () => {
343343
client: queryClient,
344344
meta: undefined,
345345
queryKey: ['key8'],
346+
queryHash: '["key8"]',
346347
signal: expect.anything(),
347348
})
348349
})

packages/query-persist-client-core/src/__tests__/createPersister.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ function setupPersister(
3030
persisterOptions: StoragePersisterOptions,
3131
) {
3232
const client = new QueryClient()
33+
const queryHash = hashKey(queryKey)
3334
const context = {
3435
meta: { foo: 'bar' },
3536
client,
3637
queryKey,
38+
queryHash,
3739
// @ts-expect-error
3840
signal: undefined as AbortSignal,
3941
} satisfies QueryFunctionContext
40-
const queryHash = hashKey(queryKey)
4142
const storageKey = `${PERSISTER_KEY_PREFIX}-${queryHash}`
4243

4344
const queryFn = vi.fn()

0 commit comments

Comments
 (0)