UNPKG

2.14 kBHTMLView Raw
1<!DOCTYPE html>
2<html>
3<head>
4 <title>OL Rendering Test Runner</title>
5 <meta charset="utf-8">
6 <link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css">
7</head>
8
9<body>
10 <div id="mocha"></div>
11
12 <script type="text/javascript" src="../node_modules/jquery/dist/jquery.min.js"></script>
13 <script type="text/javascript" src="../node_modules/expect.js/index.js"></script>
14 <script type="text/javascript" src="../node_modules/sinon/pkg/sinon.js"></script>
15 <script type="text/javascript" src="../node_modules/mocha/mocha.js"></script>
16 <script type="text/javascript" src="../node_modules/proj4/dist/proj4.js"></script>
17 <script type="text/javascript" src="../node_modules/resemblejs/resemble.js"></script>
18 <script type="text/javascript" src="../test/test-extensions.js"></script>
19 <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
20 <script>
21 mocha.setup({
22 ui: 'bdd',
23 bail: false
24 });
25 </script>
26
27 <!-- This script is provided by the debug server (started with `make serve`) -->
28 <script type="text/javascript" src="loader.js"></script>
29
30 <script type="text/javascript">
31
32 var errors = [];
33 var runner = mocha.run(function(evt) {
34 if (window.callPhantom) {
35 window.callPhantom(errors);
36 }
37 });
38
39 if (window.console && console.log) {
40 // write stacks to the console for failed tests
41 runner.on('fail', function(test, err) {
42 if (test.duration > test._timeout) {
43 var titles = [];
44 for (var p = test; p; p = p.parent) {
45 if (p.title) {
46 titles.unshift(p.title);
47 }
48 }
49 console.log('Test timed out:', titles.join(' > '));
50 }
51 errors.push({
52 title: test.fullTitle(),
53 errorStack: test.err
54 });
55 console.log(test.fullTitle());
56 console.error(test.err.stack);
57 });
58 }
59 </script>
60 <!--
61 Tests should not depend on any specific markup and should instead create
62 whatever elements are needed (cleaning up when done).
63 -->
64</body>
65</html>