Skip to content

Commit 41487fd

Browse files
committed
Fix arguments type
1 parent 1918f13 commit 41487fd

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,14 +858,20 @@ describe('fetchBaseQuery', () => {
858858
const prepare = vitest.fn()
859859
const baseQuery = fetchBaseQuery<{ foo?: string; bar?: number }>({
860860
prepareHeaders(headers, api) {
861-
expectTypeOf(api.extraOptions).toEqualTypeOf<{ foo?: string; bar?: number }>()
862-
prepare.apply(undefined, arguments)
861+
expectTypeOf(api.extraOptions).toEqualTypeOf<{
862+
foo?: string
863+
bar?: number
864+
}>()
865+
prepare.apply(undefined, arguments as unknown as any[])
863866
},
864867
})
865-
baseQuery('http://example.com', commonBaseQueryApi, { foo: 'baz', bar: 5 })
868+
baseQuery('http://example.com', commonBaseQueryApi, {
869+
foo: 'baz',
870+
bar: 5,
871+
})
866872
expect(prepare).toHaveBeenCalledWith(
867873
expect.anything(),
868-
expect.objectContaining({ extraOptions: { foo: 'baz', bar: 5 } })
874+
expect.objectContaining({ extraOptions: { foo: 'baz', bar: 5 } }),
869875
)
870876

871877
// ensure types

0 commit comments

Comments
 (0)