Skip to content

Commit c3e9147

Browse files
committed
test(toast): call done on waitForAsync tests
1 parent 69c0e2c commit c3e9147

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/igniteui-angular/src/lib/toast/toast.component.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,13 @@ describe('IgxToast', () => {
8383
expect(toast.onShowing.emit).toHaveBeenCalled();
8484
});
8585

86-
it('should emit onShown when super onAppended is fired', waitForAsync(() => {
86+
it('should emit onShown when super onAppended is fired', waitForAsync((done: DoneFn) => {
8787
toast.show();
8888

8989
toast.onAppended.subscribe(() => {
9090
spyOn(toast.onShown, 'emit');
9191
expect(toast.onShown.emit).toHaveBeenCalled();
92+
done();
9293
});
9394
}));
9495

@@ -98,13 +99,14 @@ describe('IgxToast', () => {
9899
expect(toast.onHiding.emit).toHaveBeenCalled();
99100
});
100101

101-
it('should emit onHidden when super onClosed is fired', waitForAsync(() => {
102+
it('should emit onHidden when super onClosed is fired', waitForAsync((done: DoneFn) => {
102103
toast.isVisible = true;
103104
toast.hide();
104105

105106
toast.onClosed.subscribe(() => {
106107
spyOn(toast.onHidden, 'emit');
107108
expect(toast.onHidden.emit).toHaveBeenCalled();
109+
done();
108110
});
109111
}));
110112

0 commit comments

Comments
 (0)