diff options
Diffstat (limited to 'test/ng/directive/ngIfSpec.js')
| -rwxr-xr-x | test/ng/directive/ngIfSpec.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/ng/directive/ngIfSpec.js b/test/ng/directive/ngIfSpec.js index 5726e092..0cca57d5 100755 --- a/test/ng/directive/ngIfSpec.js +++ b/test/ng/directive/ngIfSpec.js @@ -77,18 +77,22 @@ describe('ngIf', function () { describe('ngIf 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; } - 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); |
