Skip to content

Commit

Permalink
reverting to old style, using async didn't achieve anything
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Mar 29, 2017
1 parent 64a95dd commit 094bc82
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/components/clickerButton/clickerButton.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ describe('ClickerButton', () => {
expect(fixture.nativeElement.querySelectorAll('.button-inner')[0].innerHTML).toEqual('TEST CLICKER (10)');
});

it('does a click', async(() => {
it('does a click', () => {
fixture.detectChanges();
spyOn(instance['clickerService'], 'doClick');
let button: any = fixture.debugElement.nativeElement.querySelector('button');
button.click();

fixture.whenStable().then(() => {
expect(instance['clickerService'].doClick).toHaveBeenCalled();
});
}));
TestUtils.eventFire(fixture.nativeElement.querySelectorAll('button')[0], 'click');
expect(instance['clickerService'].doClick).toHaveBeenCalled();
});
});

0 comments on commit 094bc82

Please sign in to comment.