diff options
Diffstat (limited to 'test/ngRoute/directive/ngViewSpec.js')
| -rw-r--r-- | test/ngRoute/directive/ngViewSpec.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/ngRoute/directive/ngViewSpec.js b/test/ngRoute/directive/ngViewSpec.js index 6beb3d27..50531c18 100644 --- a/test/ngRoute/directive/ngViewSpec.js +++ b/test/ngRoute/directive/ngViewSpec.js @@ -511,11 +511,12 @@ describe('ngView', function() { describe('ngAnimate ', function() { var window, vendorPrefix; - var body, element; + var body, element, $rootElement; function html(html) { - body.html(html); - element = body.children().eq(0); + $rootElement.html(html); + body.append($rootElement); + element = $rootElement.children().eq(0); return element; } @@ -524,10 +525,13 @@ describe('ngView', 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); + }; + })); afterEach(function(){ dealoc(body); |
