1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>dygraphs tests</title>
<link rel="stylesheet" type="text/css" href="../node_modules/mocha/mocha.css" />
<link rel="stylesheet" type="text/css" href="../css/dygraph.css" />
<link rel="stylesheet" type="text/css" href="../common/vextlnk.css" />
<script type="text/javascript" src="../node_modules/phantomjs-function-bind-polyfill/index.js"></script>
</head>
<body>
<div id="graph"></div>
<div id="mocha"></div>
<!-- Mocha -->
<script type="text/javascript" src="../node_modules/mocha/mocha.js"></script>
<script type="text/javascript" src="../node_modules/chai/chai.js"></script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
if (window.initMochaPhantomJS) {
window.initMochaPhantomJS();
}
//--><!]]></script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var expect = chai.expect;
var assert = chai.assert;
function cleanupAfterEach() {
// Clean up the DOM before each test.
// This makes debugging easier than cleaning up after each test, since the
// DOM stays on the screen after a failure.
beforeEach(function() {
var graph = document.getElementById('graph');
graph.innerHTML = '';
graph.setAttribute('style', '');
});
}
function useProxyCanvas(utils, Proxy) {
var _origFunc = utils.getContext;
beforeEach(function() {
utils.getContext = function(canvas) {
return new Proxy(_origFunc(canvas));
}
});
afterEach(function() {
utils.getContext = _origFunc;
});
}
//--><!]]></script>
<script type="text/javascript">mocha.setup('bdd')</script>
<!-- Test data -->
<script type="text/javascript" src="data/data.js"></script>
<!-- Code under test -->
<script type="text/javascript" src="../dist/dygraph.js"></script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
require = Dygraph._require;
//--><!]]></script>
<script type="text/javascript" src="../dist/extras/smooth-plotter.js"></script>
<script type="text/javascript" src="../dist/extras/synchronizer.js"></script>
<!-- Bundled tests -->
<script type="text/javascript" src="../dist/tests.js"></script>
<script type="text/javascript"><!--//--><![CDATA[//><!--
mocha.checkLeaks();
if (window.mochaPhantomJS) {
mochaPhantomJS.run();
} else {
mocha.run();
}
//--><!]]></script>
</body>
</html>
|