Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created February 20, 2019 07:00
Embed
What would you like to do?
todo-list.actions.spec.ts
describe('loadTodoList', () => {
it('should dispatch load todolist action', () => {
const expectedAction = new LoadTodoList();
const store = jasmine.createSpyObj<Store<TodoListState>>('store', ['dispatch']);
const todoListActions = new TodoListActions(store);
todoListActions.loadTodoList();
expect(store.dispatch).toHaveBeenCalledWith(expectedAction);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment