Skip to content

Instantly share code, notes, and snippets.

@LayZeeDK
Created October 25, 2018 19:00
Show Gist options
  • Save LayZeeDK/412ce0d4e98b1fb15f82e2706393e2bf to your computer and use it in GitHub Desktop.
Save LayZeeDK/412ce0d4e98b1fb15f82e2706393e2bf to your computer and use it in GitHub Desktop.
Heroes: Testing deletion of a hero
it('emits all other heroes immediately', fakeAsync(() => {
const elektra: Hero = femaleMarvelHeroes.find(x => x.name === 'Elektra');
container.delete(elektra);
tick();
expect(observer).toHaveBeenCalledWith(
femaleMarvelHeroes.filter(x => x.id !== elektra.id));
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment