Debian Codegraph @

tests/browser/index.html

raw
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>Mocha Tests</title>
6 <link rel="stylesheet" href="../../node_modules/mocha/mocha.css" />
7 <style type="text/css">
8 body {
9 font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
10 padding: 60px 50px;
11 }
12 #mocha {
13 margin: 0;
14 }
15 div.note {
16 font-size: .8em;
17 width: 50%;
18 }
19 </style>
20 </head>
21 <body>
22 <div class="note">
23 Tests do not indicate performance. They are much slower because a
24 new environment is created for every single template and is
25 recompiled from scratch, and you can see there are
26 <a href="https://github.com/mozilla/nunjucks/blob/master/tests/compiler.js">quite</a>
27 a
28 <a href="https://github.com/mozilla/nunjucks/blob/master/tests/parser.js">lot</a>
29 of
30 <a href="https://github.com/mozilla/nunjucks/tree/master/tests">tests</a>.
31 </div>
32
33 <div id="mocha"></div>
34
35 <script src="../../node_modules/expect.js/index.js"></script>
36 <script src="../../node_modules/mocha/mocha.js"></script>
37 <script>
38 delete window.require;
39 typeof initMochaPhantomJS === 'function' && initMochaPhantomJS();
40 mocha.setup({
41 ui: 'bdd',
42 timeout: 10000
43 });
44 </script>
45
46 <script src="nunjucks.min.js"></script>
47 <script src="../util.js"></script>
48
49 <script src="../api.js"></script>
50 <script src="../lexer.js"></script>
51 <script src="../loader.js"></script>
52 <script src="../parser.js"></script>
53 <script src="../compiler.js"></script>
54 <script src="../runtime.js"></script>
55 <script src="../filters.js"></script>
56 <script src="../globals.js"></script>
57 <script src="../jinja-compat.js"></script>
58 <script src="../tests.js"></script>
59
60 <script>
61 nunjucks.testing = true;
62 mocha.checkLeaks();
63 mocha.run();
64 </script>
65 </body>
66 </html>