Created
August 15, 2018 20:36
-
-
Save LayZeeDK/0b0434438ad690ba6db215542ab3dc83 to your computer and use it in GitHub Desktop.
Heroes: Testing addition 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
it(`delegates to ${HeroService.name}`, () => { | |
const hawkeye = 'Hawkeye (Kate Bishop)'; | |
container.add(hawkeye); | |
expect(heroServiceStub.addHero).toHaveBeenCalledTimes(1); | |
expect(heroServiceStub.addHero).toHaveBeenCalledWith({ name: hawkeye }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment