Bug fix for dygraph point selection touch event.
[dygraphs.git] / auto_tests / runner.html
1 <html>
2 <head>
3 <meta charset="utf-8">
4 <title>dygraphs tests</title>
5 <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
6 <link rel="stylesheet" href="../css/dygraph.css" />
7 </head>
8 <body>
9 <div id="graph"></div>
10 <div id="mocha"></div>
11
12 <!-- Mocha -->
13 <script src="../node_modules/mocha/mocha.js"></script>
14 <script src="../node_modules/chai/chai.js"></script>
15 <script>
16 if (window.initMochaPhantomJS) {
17 window.initMochaPhantomJS();
18 }
19 </script>
20
21 <script>
22 var expect = chai.expect;
23 var assert = chai.assert;
24 function cleanupAfterEach() {
25 // Clean up the DOM before each test.
26 // This makes debugging easier than cleaning up after each test, since the
27 // DOM stays on the screen after a failure.
28 beforeEach(function() {
29 var graph = document.getElementById('graph');
30 graph.innerHTML = '';
31 graph.setAttribute('style', '');
32 });
33 }
34 function useProxyCanvas(utils, Proxy) {
35 var _origFunc = utils.getContext;
36 beforeEach(function() {
37 utils.getContext = function(canvas) {
38 return new Proxy(_origFunc(canvas));
39 }
40 });
41
42 afterEach(function() {
43 utils.getContext = _origFunc;
44 });
45 }
46 </script>
47 <script>mocha.setup('bdd')</script>
48
49 <!-- Test data -->
50 <script src="data/data.js"></script>
51
52 <!-- Bundled tests -->
53 <script src="../dist/tests.js"></script>
54
55 <script>
56 mocha.checkLeaks();
57 if (window.mochaPhantomJS) {
58 mochaPhantomJS.run();
59 } else {
60 mocha.run();
61 }
62 </script>
63 </body>
64 </html>