mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(collectionRepeat): fix tests to add a timeout.flush()
This commit is contained in:
@@ -47,7 +47,7 @@ describe('collectionRepeat', function() {
|
||||
}
|
||||
|
||||
var element;
|
||||
inject(function($compile, $rootScope) {
|
||||
inject(function($compile, $rootScope, $timeout) {
|
||||
repeaterScope = $rootScope.$new();
|
||||
attrs = attrs || '';
|
||||
if (!/item-height/.test(attrs)) attrs += ' item-height="25px"';
|
||||
@@ -61,6 +61,7 @@ describe('collectionRepeat', function() {
|
||||
$compile(element)(repeaterScope);
|
||||
$rootScope.$apply();
|
||||
content.triggerHandler('scroll.init');
|
||||
$timeout.flush();
|
||||
$rootScope.$apply();
|
||||
});
|
||||
return element;
|
||||
|
||||
Reference in New Issue
Block a user