Created
November 21, 2018 09:19
-
-
Save tidusia/af0e1e429ce5de10c200d09d65735f74 to your computer and use it in GitHub Desktop.
redux-comment-tester-ses-reducers-simplement (should return the initial state FAIL)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {}) { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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