X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/05d13a8a142ccab6425905bd6706ba77cb5f06dd..90df34ba0e84b5735c48382362284b5f0382dd0e:/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 0e05263d43..2b1920a61d 100644 --- a/src/store/auth/auth-reducer.test.ts +++ b/src/store/auth/auth-reducer.test.ts @@ -6,14 +6,15 @@ 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'; describe('auth-reducer', () => { let reducer: (state: AuthState | undefined, action: AuthAction) => any; beforeAll(() => { localStorage.clear(); - reducer = authReducer(createServices("/arvados/v1")); + reducer = authReducer(createServices(mockConfig({}))); }); it('should correctly initialise state', () => { @@ -25,7 +26,7 @@ describe('auth-reducer', () => { uuid: "uuid", ownerUuid: "ownerUuid" }; - const state = reducer(initialState, authActions.INIT({user, token: "token"})); + const state = reducer(initialState, authActions.INIT({ user, token: "token" })); expect(state).toEqual({ apiToken: "token", user