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, '');