Upgrade frontend-auth to 4.0.0
This commit is contained in:
@@ -14,6 +14,8 @@ import {
|
||||
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
const axiosMock = new MockAdapter(apiClient);
|
||||
apiClient.isAccessTokenExpired = jest.fn();
|
||||
apiClient.isAccessTokenExpired.mockReturnValue(false);
|
||||
|
||||
describe('actions', () => {
|
||||
afterEach(() => {
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
const axiosMock = new MockAdapter(apiClient);
|
||||
apiClient.isAccessTokenExpired = jest.fn();
|
||||
apiClient.isAccessTokenExpired.mockReturnValue(false);
|
||||
|
||||
describe('actions', () => {
|
||||
afterEach(() => {
|
||||
|
||||
@@ -17,6 +17,8 @@ import { sortAlphaAsc } from './utils';
|
||||
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
const axiosMock = new MockAdapter(apiClient);
|
||||
apiClient.isAccessTokenExpired = jest.fn();
|
||||
apiClient.isAccessTokenExpired.mockReturnValue(false);
|
||||
|
||||
describe('actions', () => {
|
||||
afterEach(() => {
|
||||
|
||||
@@ -17,6 +17,8 @@ import { STARTED_FETCHING_ASSIGNMENT_TYPES } from '../constants/actionTypes/assi
|
||||
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
const axiosMock = new MockAdapter(apiClient);
|
||||
apiClient.isAccessTokenExpired = jest.fn();
|
||||
apiClient.isAccessTokenExpired.mockReturnValue(false);
|
||||
|
||||
const course1Id = 'course-v1:edX+DemoX+Demo_Course';
|
||||
const course2Id = 'course-v1:edX+DemoX+Demo_Course_2';
|
||||
|
||||
@@ -13,6 +13,8 @@ import {
|
||||
|
||||
const mockStore = configureMockStore([thunk]);
|
||||
const axiosMock = new MockAdapter(apiClient);
|
||||
apiClient.isAccessTokenExpired = jest.fn();
|
||||
apiClient.isAccessTokenExpired.mockReturnValue(false);
|
||||
|
||||
describe('actions', () => {
|
||||
afterEach(() => {
|
||||
|
||||
@@ -45,6 +45,9 @@ const App = () => (
|
||||
</Provider>
|
||||
);
|
||||
|
||||
if (apiClient.ensurePublicOrAuthencationAndCookies(window.location.pathname)) {
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
}
|
||||
apiClient.ensurePublicOrAuthenticationAndCookies(
|
||||
window.location.pathname,
|
||||
() => {
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user