aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgor Minar2013-01-09 22:07:33 -0800
committerIgor Minar2013-01-14 21:59:23 -0800
commit2ba458387d19543b45c3bfdbe8db719d2c0f1f15 (patch)
tree52810842afaf39a2dc85a4b3db2ee3f07cdd5734 /test
parent98489a1d0cf289fc2261a02539b96d265cef8f09 (diff)
downloadangular.js-2ba458387d19543b45c3bfdbe8db719d2c0f1f15.tar.bz2
fix($compile): safely create transclude comment nodes
Closes #1740
Diffstat (limited to 'test')
-rw-r--r--test/ng/compileSpec.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js
index 75af0181..3a0e0289 100644
--- a/test/ng/compileSpec.js
+++ b/test/ng/compileSpec.js
@@ -2222,5 +2222,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|');
+ }));
});
});