Sha256: 6463adf373a26f3f027955f9abb7d7e47bc8df01b1e6174d89b25700e769bf35

Contents?: true

Size: 712 Bytes

Versions: 5

Compression:

Stored size: 712 Bytes

Contents

window.onload = function () {
  // The iframe order is undefined, so we make it predictable.
  mocha.suite.suites.sort(function (a, b) {
    return a.path.localeCompare(b.path);
  });

  // Check that all iframes loaded successfully.
  var iframes = document.getElementsByTagName('iframe');
  for (var i = 0; i < iframes.length; ++i) {
    if (!iframes[i].contentWindow.mocha) {
      (function (path) {
        mocha.suite.addTest(new Mocha.Test(path, function () {
          throw new Error("Failed to load " + path + ".\n" +
                          "Perhaps it failed to compile? Check the rake output for errors.");
        }));
      })(iframes[i].getAttribute("data-path"));
    }
  }

  mocha.run();
};

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
konacha-3.2.1 app/assets/javascripts/konacha/parent.js
konacha-3.2.0 app/assets/javascripts/konacha/parent.js
konacha-3.1.0 app/assets/javascripts/konacha/parent.js
konacha-3.0.0 app/assets/javascripts/konacha/parent.js
konacha-2.7.0 app/assets/javascripts/konacha/parent.js