<html>
<head>
    <title>Jasmine Test Runner & Coverage report</title>
    <link rel="stylesheet" href="{{ STATIC_URL }}css/jasmine.css"
        media="screen">

    {# core and source files #}
    {% for script in jstestdriver_conf.load %}
    <script type="text/javascript" src="{{ MEDIA_URL }}{{ script }}"></script>
    {% endfor %}

    {# fixtures #}
    {% for script in jstestdriver_conf.serve %}
    <script type="text/javascript" src="{{ MEDIA_URL }}{{ script }}"></script>
    {% endfor %}

    {# spec files #}
    {% for script in jstestdriver_conf.test %}
    <script type="text/javascript" src="{{ MEDIA_URL }}{{ script }}"></script>
    {% endfor %}

</head>
<body>

<h1>Jasmine Spec Runner & Coverage Report</h1>

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

        var trivialReporter = new jasmine.TrivialReporter();

        jasmineEnv.addReporter(trivialReporter);

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

        // Additional configuration can be done in this block
        {% block jasmine_extra %}{% endblock %}

        var currentWindowOnload = window.onload;

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

        function execJasmine() {
            jasmineEnv.execute();
        }
    })();
    {% endblock %}
</script>

<iframe width="100%" height="420px" src="{{ MEDIA_URL }}js/tests/output/html/index.html" frameborder="0"></iframe>
</body>
</html>
