4 <title>dygraphs tests
</title>
5 <link rel=
"stylesheet" href=
"../node_modules/mocha/mocha.css" />
11 <!-- Polyfills for PhantomJS --
>
12 <script src=
"../node_modules/babel-core/browser-polyfill.js"></script>
15 <script src=
"../node_modules/mocha/mocha.js"></script>
16 <script src=
"../node_modules/chai/chai.js"></script>
18 if (window.initMochaPhantomJS) {
19 window.initMochaPhantomJS();
24 var expect = chai.expect;
25 var assert = chai.assert;
26 function cleanupAfterEach() {
27 // Clean up the DOM before each test.
28 // This makes debugging easier than cleaning up after each test, since the
29 // DOM stays on the screen after a failure.
30 beforeEach(function() {
31 var graph = document.getElementById('graph');
33 graph.setAttribute('style', '');
36 function useProxyCanvas(utils, Proxy) {
37 var _origFunc = utils.getContext;
38 beforeEach(function() {
39 utils.getContext = function(canvas) {
40 return new Proxy(_origFunc(canvas));
44 afterEach(function() {
45 utils.getContext = _origFunc;
49 <script>mocha.setup('bdd')
</script>
52 <script src=
"data/data.js"></script>
54 <!-- Bundled tests --
>
55 <script src=
"../dist/tests.js"></script>
59 if (window.mochaPhantomJS) {