apply eslint and prettier rules

This commit is contained in:
Sebastian Sdorra
2019-10-21 10:57:56 +02:00
parent 85773186db
commit 4bb8e6153b
227 changed files with 1147 additions and 4076 deletions

View File

@@ -35,10 +35,7 @@ import reducer, {
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
import fetchMock from "fetch-mock";
import {
FETCH_INDEXRESOURCES_PENDING,
FETCH_INDEXRESOURCES_SUCCESS
} from "./indexResource";
import { FETCH_INDEXRESOURCES_PENDING, FETCH_INDEXRESOURCES_SUCCESS } from "./indexResource";
const me = {
name: "tricia",
@@ -143,11 +140,9 @@ describe("auth actions", () => {
const store = mockStore({});
return store
.dispatch(login("/auth/access_token", "tricia", "secret123"))
.then(() => {
expect(store.getActions()).toEqual(expectedActions);
});
return store.dispatch(login("/auth/access_token", "tricia", "secret123")).then(() => {
expect(store.getActions()).toEqual(expectedActions);
});
});
it("should dispatch login failure", () => {
@@ -156,14 +151,12 @@ describe("auth actions", () => {
});
const store = mockStore({});
return store
.dispatch(login("/auth/access_token", "tricia", "secret123"))
.then(() => {
const actions = store.getActions();
expect(actions[0].type).toEqual(LOGIN_PENDING);
expect(actions[1].type).toEqual(LOGIN_FAILURE);
expect(actions[1].payload).toBeDefined();
});
return store.dispatch(login("/auth/access_token", "tricia", "secret123")).then(() => {
const actions = store.getActions();
expect(actions[0].type).toEqual(LOGIN_PENDING);
expect(actions[1].type).toEqual(LOGIN_FAILURE);
expect(actions[1].payload).toBeDefined();
});
});
it("should dispatch fetch me success", () => {
@@ -296,9 +289,7 @@ describe("auth actions", () => {
const store = mockStore({});
return store.dispatch(logout("/auth/access_token")).then(() => {
expect(window.location.assign.mock.calls[0][0]).toBe(
"http://example.com/cas/logout"
);
expect(window.location.assign.mock.calls[0][0]).toBe("http://example.com/cas/logout");
expect(store.getActions()).toEqual(expectedActions);
});
});