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/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 var expect = chai.expect;
19 var assert = chai.assert;
20 function cleanupAfterEach() {
21 // Clean up the DOM before each test.
22 // This makes debugging easier than cleaning up after each test, since the
23 // DOM stays on the screen after a failure.
24 beforeEach(function() {
25 var graph = document.getElementById('graph');
27 graph.setAttribute('style', '');
30 function useProxyCanvas(utils, Proxy) {
31 var _origFunc = utils.getContext;
32 beforeEach(function() {
33 utils.getContext = function(canvas) {
34 return new Proxy(_origFunc(canvas));
38 afterEach(function() {
39 utils.getContext = _origFunc;
43 <script>mocha.setup('bdd')
</script>
46 <script src=
"data/data.js"></script>
48 <!-- Bundled tests --
>
49 <script src=
"../dist/tests.js"></script>
53 if (window.mochaPhantomJS) {