Last active
October 10, 2018 16:46
-
-
Save LayZeeDK/0ea4c11f948f009178204fdfa7fa195b 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('does not emit the specified hero when server fails', fakeAsync(() => { | |
heroServiceStub.addHero.and.returnValue( | |
throwError(new Error('server error'), asapScheduler)); | |
const scarletWitch = 'Scarlet Witch'; | |
container.add(scarletWitch); | |
tick(); | |
expect(observer).not.toHaveBeenCalledWith([ | |
...femaleMarvelHeroes, | |
{ id: 42, name: scarletWitch }, | |
]); | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment