Skip to content

Commit

Permalink
test fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Oct 28, 2021
1 parent eb1b9c0 commit 09e4306
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
19 changes: 11 additions & 8 deletions packages/toolkit/src/query/tests/errorHandling.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ const failQueryOnce = rest.get('/query', (_, req, ctx) =>
)

describe('fetchBaseQuery', () => {
const commonBaseQueryApiArgs: BaseQueryApi = {
signal: new AbortController().signal,
dispatch: storeRef.store.dispatch,
getState: storeRef.store.getState,
extra: undefined,
type: 'query',
endpoint: 'doesntmatterhere',
}
let commonBaseQueryApiArgs: BaseQueryApi = {} as any
beforeEach(() => {
commonBaseQueryApiArgs = {
signal: new AbortController().signal,
dispatch: storeRef.store.dispatch,
getState: storeRef.store.getState,
extra: undefined,
type: 'query',
endpoint: 'doesntmatterhere',
}
})
test('success', async () => {
await expect(
baseQuery('/success', commonBaseQueryApiArgs, {})
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ beforeEach(() => {
dispatch: storeRef.store.dispatch,
getState: storeRef.store.getState,
extra: undefined,
endpoint: '',
type: 'query',
endpoint: 'doesntmatterhere',
}
})

Expand Down

0 comments on commit 09e4306

Please sign in to comment.