'+
- '<#comment>#comment>'+
+ '' +
'
'+
- '<#comment>#comment>'+
+ '' +
'
'+
'
'+
'
'+
'
'+
- '<#comment>#comment>'+
+ '' +
'
'+
'
'+
'
' +
@@ -311,9 +311,11 @@ describe('Binder', function() {
expect(d1.hasClass('o')).toBeTruthy();
expect(d2.hasClass('e')).toBeTruthy();
expect(sortedHtml(element)).toBe(
- '
<#comment>#comment>' +
+ '
');
+ '
' +
+ '
');
}));
it('BindStyle', inject(function($rootScope, $compile) {
@@ -416,7 +418,7 @@ describe('Binder', function() {
$rootScope.$apply();
expect(sortedHtml(element)).toBe(
'
' +
- '<#comment>#comment>' +
+ '' +
'- a0
' +
'- b1
' +
'
');
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 679294ee..732669c5 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -120,11 +120,14 @@ function dealoc(obj) {
function sortedHtml(element, showNgClass) {
var html = "";
forEach(jqLite(element), function toString(node) {
+
if (node.nodeName == "#text") {
html += node.nodeValue.
replace(/&(\w+[&;\W])?/g, function(match, entity){return entity?match:'&';}).
replace(//g, '>');
+ } else if (node.nodeName == "#comment") {
+ html += '';
} else {
html += '<' + (node.nodeName || '?NOT_A_NODE?').toLowerCase();
var attributes = node.attributes || [];
--
cgit v1.2.3