X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c4e503180948300c3a6ef99e338d2e56b2931236..65bdf250e5a09633e482bacd968666861643c150:/src/store/auth/auth-reducer.test.ts diff --git a/src/store/auth/auth-reducer.test.ts b/src/store/auth/auth-reducer.test.ts index aaedd40d..1202bacb 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -6,14 +6,20 @@ import { authReducer, AuthState } from "./auth-reducer"; import { AuthAction, authActions } from "./auth-action"; import 'jest-localstorage-mock'; -import { createServices } from "../../services/services"; +import { createServices } from "~/services/services"; +import { mockConfig } from '~/common/config'; +import { ApiActions } from "~/services/api/api-actions"; describe('auth-reducer', () => { let reducer: (state: AuthState | undefined, action: AuthAction) => any; + const actions: ApiActions = { + progressFn: (id: string, working: boolean) => {}, + errorFn: (id: string, message: string) => {} + }; beforeAll(() => { localStorage.clear(); - reducer = authReducer(createServices({ apiHost: "/arvados/v1", keepWebHost: "" })); + reducer = authReducer(createServices(mockConfig({}), actions)); }); it('should correctly initialise state', () => {