<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/>
  <link rel="shortcut icon" href="jasmine_favicon.png">
  <title>Jasmine suite</title>

  {% for css_file in css_files %}
      <link rel="stylesheet" href="{{ css_file }}" type="text/css" media="screen"/>
  {% endfor %}
  {% for js_file in js_files %}
      <script src="{{ js_file }}" type="text/javascript"></script>
  {% endfor %}

  <script>
      (function() {
          var jasmineEnv = jasmine.getEnv();
          jasmineEnv.updateInterval = 1000;

          var htmlReporter = new jasmine.HtmlReporter();
          var jsApiReporter = new jasmine.JsApiReporter();

          window.jsApiReporter = jsApiReporter;

          jasmineEnv.addReporter(htmlReporter);
          jasmineEnv.addReporter(jsApiReporter);

          jasmineEnv.specFilter = function(spec) {
              return htmlReporter.specFilter(spec);
          };

          var currentWindowOnload = window.onload;

          window.onload = function() {
              if (currentWindowOnload) {
                  currentWindowOnload();
              }
              execJasmine();
          };

          function execJasmine() {
              jasmineEnv.execute();
          }

      })();
    </script>
</head>
<body>
    <div id="jasmine_content"></div>
</body>
</html>
