Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.