refactor(tests): simplify code (#11485)

This commit is contained in:
Victor Berchet
2016-09-09 12:04:38 -07:00
committed by Evan Martin
parent f5d44a42c9
commit 5a4e46db20
21 changed files with 505 additions and 544 deletions

View File

@ -345,14 +345,14 @@ export function main() {
fixture = TestBed.createComponent(EventsComp);
fixture.detectChanges();
expect(fixture.debugElement.componentInstance.clicked).toBe(false);
expect(fixture.debugElement.componentInstance.customed).toBe(false);
expect(fixture.componentInstance.clicked).toBe(false);
expect(fixture.componentInstance.customed).toBe(false);
fixture.debugElement.children[0].triggerEventHandler('click', <Event>{});
expect(fixture.debugElement.componentInstance.clicked).toBe(true);
expect(fixture.componentInstance.clicked).toBe(true);
fixture.debugElement.children[1].triggerEventHandler('myevent', <Event>{});
expect(fixture.debugElement.componentInstance.customed).toBe(true);
expect(fixture.componentInstance.customed).toBe(true);
});
});