Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it('should show quote after getQuote (async)', async(() => {
- fixture.detectChanges(); // ngOnInit()
- expect(quoteEl.textContent).toBe('...', 'should show placeholder');
- fixture.whenStable().then(() => { // wait for async getQuote
- fixture.detectChanges(); // update view with quote
- expect(quoteEl.textContent).toBe(testQuote);
- expect(errorMessage()).toBeNull('should not show error');
- });
- }));
Add Comment
Please, Sign In to add comment