todo-list.reducers.spec.ts
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
describe('todoItemsLoadFailed', () => { | |
it('should return isLoading false and error', () => { | |
const initState = new TodoListInitState(); | |
const error = new Error('http error'); | |
const loadTodoItemsAction = new GenericAction(TodoListActionTypes.TodoItemsLoadFailed, error); | |
const newState = todoListReducers(initState, loadTodoItemsAction); | |
expect(newState.isLoading).toBe(false); | |
expect(newState.errors).toBe(error); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment