From 3a5054dd58bd118068f3f29787228a27c42c8684 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 28 Aug 2017 17:11:42 -0400 Subject: [PATCH] remove comments from HTML to be normalized, fixes final test --- test/helpers.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/helpers.js b/test/helpers.js index 6f33327292..8958235cda 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -75,12 +75,6 @@ function cleanChildren(node) { // recurse [...node.childNodes].forEach(child => { - if (child.nodeType === 8) { - // comment - node.removeChild(child); - return; - } - if (child.nodeType === 3) { // text if ( @@ -123,6 +117,7 @@ export function normalizeHtml(window, html) { try { const node = window.document.createElement('div'); node.innerHTML = html + .replace(//g, '') .replace(/>[\s\r\n]+<') .trim(); cleanChildren(node, '');