mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(): fix $timeout.flush
This commit is contained in:
@@ -34,6 +34,7 @@ describe('Ionic ActionSheet Service', function() {
|
||||
spyOn(scope, '$destroy');
|
||||
spyOn(scope.element, 'remove');
|
||||
scope.removeSheet();
|
||||
$timeout.flush()
|
||||
expect($document[0].body.classList.contains('action-sheet-open')).toBe(false);
|
||||
expect(scope.element.hasClass('active')).toBe(false);
|
||||
expect(scope.$destroy).toHaveBeenCalled();
|
||||
|
||||
@@ -267,6 +267,7 @@ describe('$ionicPopup service', function() {
|
||||
$timeout.flush();
|
||||
expect($ionicBackdrop.release).toHaveBeenCalled();
|
||||
expect(backDoneSpy).toHaveBeenCalled();
|
||||
$timeout.flush();
|
||||
expect(document.body.classList.contains('popup-open')).toBe(false);
|
||||
}));
|
||||
it('template should only overwrite prompt input if it includes html', inject(function($timeout) {
|
||||
|
||||
Reference in New Issue
Block a user