diff options
Diffstat (limited to 'test/ng')
| -rw-r--r-- | test/ng/compileSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index 5b644af9..927a4ef7 100644 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -2241,5 +2241,15 @@ describe('$compile', function() { expect(nodeName_(comment)).toBe('#comment'); }); }); + + + it('should safely create transclude comment node and not break with "-->"', + inject(function($rootScope) { + // see: https://github.com/angular/angular.js/issues/1740 + element = $compile('<ul><li ng-repeat="item in [\'-->\', \'x\']">{{item}}|</li></ul>')($rootScope); + $rootScope.$digest(); + + expect(element.text()).toBe('-->|x|'); + })); }); }); |
