Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created February 19, 2019 06:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
todo-list.reducers.spec.ts
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