Last active
October 25, 2018 18:58
-
-
Save LayZeeDK/2c4ac61894c269c1738f2d8f9340b70c to your computer and use it in GitHub Desktop.
Heroes: Testing deletion of a hero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('deletes a hero', () => { | |
it(`delegates to ${HeroService.name}`, () => { | |
const gamora: Hero = femaleMarvelHeroes.find(x => x.name === 'Gamora'); | |
container.delete(gamora); | |
expect(heroServiceStub.deleteHero).toHaveBeenCalledTimes(1); | |
expect(heroServiceStub.deleteHero).toHaveBeenCalledWith(gamora); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment