/* eslint no-underscore-dangle: "off" */

window.useFixture = function addFixture(html) {
  const body = document.querySelector("body");
  const fragment = `<div>${html}</div>`;

  body.insertAdjacentHTML("beforeend", fragment);
};

window.clearFixtures = function clearAllFixtures() {
  const body = document.querySelector("body");

  while (body.firstChild) {
    body.removeChild(body.firstChild);
  }
};

window.__karma__.start = (function jasmineAdapter(originalStartJasmine) {
  return function startJasmine(...args) {
    const originalOnLoadHandler = window.onload;

    window.onload = function handleOnLoad() {
      if (originalOnLoadHandler) {
        originalOnLoadHandler();
      }

      originalStartJasmine(...args);
    };
  };
})(window.__karma__.start);

@@ -80,37 +80,24 @@
 re(html) %7B%0A 
- const body =
  document.qu
@@ -119,58 +119,8 @@
 dy%22)
-;%0A  const fragment = %60%3Cdiv%3E$%7Bhtml%7D%3C/div%3E%60;%0A%0A  body
 .ins
@@ -152,16 +152,12 @@
 d%22, 
-fragment
+html
 );%0A%7D
@@ -217,21 +217,8 @@
  %7B%0A 
- const body =
  doc
@@ -248,81 +248,24 @@
 dy%22)
-;%0A%0A  while (body.firstChild) %7B%0A    body.removeChild(body.firstChild);%0A  %7D
+.innerText = %22%22;
 %0A%7D;%0A

Update Jasmine setup