Skip to content

Commit 43bba18

Browse files
author
Lenz Weber
committed
stop using deprecated apis in tests
1 parent b5ed969 commit 43bba18

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/toolkit/src/query/tests/buildHooks.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,7 @@ describe('hooks tests', () => {
864864
expectType<string>(res.requestId)
865865
expectType<() => void>(res.abort)
866866
expectType<() => Promise<{ name: string }>>(res.unwrap)
867+
expectType<() => void>(res.reset)
867868
expectType<() => void>(res.unsubscribe)
868869

869870
// abort the mutation immediately to force an error
@@ -1938,7 +1939,7 @@ describe('hooks with createApi defaults set', () => {
19381939
increment.matchPending,
19391940
increment.matchFulfilled,
19401941
increment.matchPending,
1941-
api.internalActions.unsubscribeMutationResult.match,
1942+
api.internalActions.removeMutationResult.match,
19421943
increment.matchFulfilled
19431944
)
19441945
})

packages/toolkit/src/query/tests/optimisticUpdates.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ describe('updateQueryData', () => {
172172

173173
act(() => {
174174
storeRef.store.dispatch(
175-
api.util.patchQueryResult('post', '3', returnValue.inversePatches)
175+
api.util.patchQueryData('post', '3', returnValue.inversePatches)
176176
)
177177
})
178178

0 commit comments

Comments
 (0)