diff options
| author | Igor Minar | 2013-07-02 11:11:52 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-07-02 11:11:52 -0700 |
| commit | 726e0c246bfbece82fcf606493e64b97d3e6e711 (patch) | |
| tree | 2b830a90aeb08b4c4648a2cb7b36b4908bc341ae /test | |
| parent | c46c5924c4a7c6131086429c6e0ccae8151137be (diff) | |
| download | angular.js-726e0c246bfbece82fcf606493e64b97d3e6e711.tar.bz2 | |
test(ngRepeat): disable an element directive test on IE8
Diffstat (limited to 'test')
| -rw-r--r-- | test/ng/directive/ngRepeatSpec.js | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/test/ng/directive/ngRepeatSpec.js b/test/ng/directive/ngRepeatSpec.js index 58849d03..be4ff3e5 100644 --- a/test/ng/directive/ngRepeatSpec.js +++ b/test/ng/directive/ngRepeatSpec.js @@ -523,21 +523,25 @@ describe('ngRepeat', function() { })); - it('should work when placed on a root element of element directive with ASYNC replaced template', - inject(function($templateCache, $compile, $rootScope) { - $compileProvider.directive('replaceMeWithRepeater', function() { - return { - restrict: 'E', - replace: true, - templateUrl: 'replace-me-with-repeater.html' - }; - }); - $templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>'); - element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope); - expect(element.text()).toBe(''); - $rootScope.$apply(); - expect(element.text()).toBe('123'); - })); + if (!msie || msie > 8) { + // only IE>8 supports element directives + + it('should work when placed on a root element of element directive with ASYNC replaced template', + inject(function($templateCache, $compile, $rootScope) { + $compileProvider.directive('replaceMeWithRepeater', function() { + return { + restrict: 'E', + replace: true, + templateUrl: 'replace-me-with-repeater.html' + }; + }); + $templateCache.put('replace-me-with-repeater.html', '<div ng-repeat="i in [1,2,3]">{{i}}</div>'); + element = $compile('<div><replace-me-with-repeater></replace-me-with-repeater></div>')($rootScope); + expect(element.text()).toBe(''); + $rootScope.$apply(); + expect(element.text()).toBe('123'); + })); + } }); |
