-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(actionSheetTest): fix failing actionSheet unit test
- Loading branch information
1 parent
38e7166
commit bab6cad
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,11 @@ describe('Ionic ActionSheet Service', function() { | |
$q.flush(); | ||
expect($document[0].body.classList.contains('action-sheet-open')).toBe(false); | ||
expect(scope.element.hasClass('active')).toBe(false); | ||
expect(scope.$destroy).toHaveBeenCalled(); | ||
expect(scope.element.remove).toHaveBeenCalled(); | ||
//Naughty, but ngAnimate can't be flushed ATM | ||
$timeout(function() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mhartington
Author
Contributor
|
||
expect(scope.$destroy).toHaveBeenCalled(); | ||
expect(scope.element.remove).toHaveBeenCalled(); | ||
}); | ||
})); | ||
|
||
it('destructiveButtonClicked should removeSheet if returning true', function() { | ||
|
This just makes it so these two expectations will never run.
The code in the $timeout callback will never be called, because angular-mocks makes $timeout mocked to not do anything until
$timeout.flush()
is called.Therefore, you've done the equivalent of commenting out these test cases.
Just thought I'd let you know.