Last active
March 12, 2019 15:33
-
-
Save FunnyGhost/a5d9e6a382b758a7a656a977c3a2edc3 to your computer and use it in GitHub Desktop.
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('FavoriteMoviesComponent', () => { | |
| let component: FavoriteMoviesComponent; | |
| let fixture: ComponentFixture<FavoriteMoviesComponent>; | |
| let favoriteMovieService: FavoriteMoviesService; | |
| beforeEach(() => { | |
| fixture = TestBed.createComponent(FavoriteMoviesComponent); | |
| component = fixture.componentInstance; | |
| favoriteMovieService = TestBed.get(FavoriteMoviesService); | |
| jest.spyOn(favoriteMovieService, 'getFavoriteMovies').mockReturnValue(of(favoriteMoviesToUse)); | |
| }); | |
| describe('Getting the movies', () => { | |
| it('should get the movies from the service', () => { | |
| fixture.detectChanges(); | |
| expect(favoriteMovieService.getFavoriteMovies).toHaveBeenCalled(); | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment