4 <title>dygraphs tests
</title>
5 <link rel=
"stylesheet" href=
"../node_modules/mocha/mocha.css" />
6 <link rel=
"stylesheet" href=
"../css/dygraph.css" />
10 <div id=
"mocha"></div>
12 <!-- Polyfills for PhantomJS --
>
13 <script src=
"../node_modules/babel-core/browser-polyfill.js"></script>
16 <script src=
"../node_modules/mocha/mocha.js"></script>
17 <script src=
"../node_modules/chai/chai.js"></script>
19 if (window.initMochaPhantomJS) {
20 window.initMochaPhantomJS();
25 var expect = chai.expect;
26 var assert = chai.assert;
27 function cleanupAfterEach() {
28 // Clean up the DOM before each test.
29 // This makes debugging easier than cleaning up after each test, since the
30 // DOM stays on the screen after a failure.
31 beforeEach(function() {
32 var graph = document.getElementById('graph');
34 graph.setAttribute('style', '');
37 function useProxyCanvas(utils, Proxy) {
38 var _origFunc = utils.getContext;
39 beforeEach(function() {
40 utils.getContext = function(canvas) {
41 return new Proxy(_origFunc(canvas));
45 afterEach(function() {
46 utils.getContext = _origFunc;
50 <script>mocha.setup('bdd')
</script>
53 <script src=
"data/data.js"></script>
55 <!-- Bundled tests --
>
56 <script src=
"../dist/tests.js"></script>
60 if (window.mochaPhantomJS) {