Skip to content

Commit bab6cad

Browse files
committed
fix(actionSheetTest): fix failing actionSheet unit test
1 parent 38e7166 commit bab6cad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/unit/angular/service/actionSheet.unit.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ describe('Ionic ActionSheet Service', function() {
3535
$q.flush();
3636
expect($document[0].body.classList.contains('action-sheet-open')).toBe(false);
3737
expect(scope.element.hasClass('active')).toBe(false);
38-
expect(scope.$destroy).toHaveBeenCalled();
39-
expect(scope.element.remove).toHaveBeenCalled();
38+
//Naughty, but ngAnimate can't be flushed ATM
39+
$timeout(function() {
40+
expect(scope.$destroy).toHaveBeenCalled();
41+
expect(scope.element.remove).toHaveBeenCalled();
42+
});
4043
}));
4144

4245
it('destructiveButtonClicked should removeSheet if returning true', function() {

0 commit comments

Comments
 (0)