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>
13 <script src=
"../node_modules/mocha/mocha.js"></script>
14 <script src=
"../node_modules/chai/chai.js"></script>
16 if (window.initMochaPhantomJS) {
17 window.initMochaPhantomJS();
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');
31 graph.setAttribute('style', '');
34 function useProxyCanvas(utils, Proxy) {
35 var _origFunc = utils.getContext;
36 beforeEach(function() {
37 utils.getContext = function(canvas) {
38 return new Proxy(_origFunc(canvas));
42 afterEach(function() {
43 utils.getContext = _origFunc;
47 <script>mocha.setup('bdd')
</script>
50 <script src=
"data/data.js"></script>
52 <!-- Bundled tests --
>
53 <script src=
"../dist/tests.js"></script>
57 if (window.mochaPhantomJS) {