Guest User

Untitled

a guest
Dec 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. it('should be stable for component OnInit', async(() => {
  2. const fixture = TestBed.createComponent(DemoComponent);
  3. fixture.componentInstance.ngOnInit();
  4. expect(fixture.isStable()).toBe(true);
  5. }));
  6.  
  7. it('should be unstable for fixture OnInit', async(() => {
  8. const fixture = TestBed.createComponent(DemoComponent);
  9. fixture.detectChanges();
  10. expect(fixture.isStable()).toBe(false);
  11. }));
Add Comment
Please, Sign In to add comment