Skip to content

Instantly share code, notes, and snippets.

@tidusia
Created November 21, 2018 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tidusia/af0e1e429ce5de10c200d09d65735f74 to your computer and use it in GitHub Desktop.
Save tidusia/af0e1e429ce5de10c200d09d65735f74 to your computer and use it in GitHub Desktop.
redux-comment-tester-ses-reducers-simplement (should return the initial state FAIL)
export const ACTIONS = {
GET_USER_REQUEST: "GET_USER_REQUEST",
GET_USER_SUCCESS: "GET_USER_SUCCESS",
GET_USER_FAILURE: "GET_USER_FAILURE"
};
export const initialState = {
isFetching: false,
errors: [],
profile: {}
};
export default function reducer(state, action = {}) {
}
import reducer, { initialState } from "./index";
describe("User reducer", () => {
it("should return the initial state", () => {
const actual = reducer(undefined, {});
const expected = initialState;
expect(actual).toEqual(expected);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment