aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/directive/ngRepeatSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ng/directive/ngRepeatSpec.js')
-rw-r--r--test/ng/directive/ngRepeatSpec.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js
index 492f851d..21ea21e9 100644
--- a/test/ng/directive/ngRepeatSpec.js
+++ b/test/ng/directive/ngRepeatSpec.js
@@ -708,11 +708,11 @@ describe('ngRepeat', function() {
describe('ngRepeat ngAnimate', function() {
var vendorPrefix, window;
- var body, element;
+ var body, element, $rootElement;
function html(html) {
- body.html(html);
- element = body.children().eq(0);
+ $rootElement.html(html);
+ element = $rootElement.children().eq(0);
return element;
}
@@ -721,10 +721,14 @@ describe('ngRepeat ngAnimate', function() {
element.css(vendorPrefix + cssProp, cssValue);
}
- beforeEach(function() {
+ beforeEach(module(function() {
// we need to run animation on attached elements;
- body = jqLite(document.body);
- });
+ return function(_$rootElement_) {
+ $rootElement = _$rootElement_;
+ body = jqLite(document.body);
+ body.append($rootElement);
+ };
+ }));
afterEach(function(){
dealoc(body);