base.html 1.56 KB
Newer Older
1 2 3 4 5
<!doctype html>

<html>
<head>
    <title>Jasmine Spec Runner</title>
6 7 8

    {% load staticfiles %}
    <link rel="stylesheet" href="{% static 'jasmine-latest/jasmine.css' %}" media="screen">
9 10

    {# core files #}
11 12
    <script  src="{% static 'jasmine-latest/jasmine.js' %}"></script>
    <script  src="{% static 'jasmine-latest/jasmine-html.js' %}"></script>
13
    <script  src="{% static 'js/vendor/jasmine-jquery.js' %}"></script>
14 15 16 17 18 19

    {# source files #}
    {% for url in suite.js_files %}
    <script src="{{ url }}"></script>
    {% endfor %}

20
    {% load compressed %}
21
    {# static files #}
22
    {% compressed_js 'application' %}
23
    {% compressed_js 'module-js' %}
24 25

    {# spec files #}
26
    {% compressed_js 'spec' %}
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

</head>
<body>

<h1>Jasmine Spec Runner</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>

</body>
</html>