Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created February 20, 2019 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lydemann/b8b14b39617b8a00884e5c2b0b843bf9 to your computer and use it in GitHub Desktop.
Save lydemann/b8b14b39617b8a00884e5c2b0b843bf9 to your computer and use it in GitHub Desktop.
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