X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Ffill_step_plot.js;h=64060169e082ed4c93670616444ab4f3bbb483db;hb=1c725c8774f51aacbc399edaee7dd5e7fc9bbc5c;hp=be1302b0c7c68fa733ca833c8c461d9ffb8455cd;hpb=319d0361d2e512ed8049dfedffd79254e491201c;p=dygraphs.git diff --git a/auto_tests/tests/fill_step_plot.js b/auto_tests/tests/fill_step_plot.js index be1302b..6406016 100644 --- a/auto_tests/tests/fill_step_plot.js +++ b/auto_tests/tests/fill_step_plot.js @@ -4,27 +4,27 @@ * * @author benoitboivin.pro@gmail.com (Benoit Boivin) */ -var fillStepPlotTestCase = TestCase("fill-step-plot"); +describe("fill-step-plot", function() { -fillStepPlotTestCase.prototype.setUp = function() { +beforeEach(function() { document.body.innerHTML = "
"; -}; +}); var origFunc = Dygraph.getContext; -fillStepPlotTestCase.prototype.setUp = function() { +beforeEach(function() { document.body.innerHTML = "
"; Dygraph.getContext = function(canvas) { return new Proxy(origFunc(canvas)); }; -}; +}); -fillStepPlotTestCase.prototype.tearDown = function() { +afterEach(function() { Dygraph.getContext = origFunc; -}; +}); -fillStepPlotTestCase.prototype.testFillStepPlotNullValues = function() { +it('testFillStepPlotNullValues', function() { var opts = { labels: ["x","y"], width: 480, @@ -45,7 +45,7 @@ fillStepPlotTestCase.prototype.testFillStepPlotNullValues = function() { var graph = document.getElementById("graph"); var g = new Dygraph(graph, data, opts); - htx = g.hidden_ctx_; + var htx = g.hidden_ctx_; var x1 = data[3][0]; var y1 = data[2][1]; var x2 = data[3][0]; @@ -55,4 +55,6 @@ fillStepPlotTestCase.prototype.testFillStepPlotNullValues = function() { // Check if a line is drawn between the previous y and the bottom of the chart CanvasAssertions.assertLineDrawn(htx, xy1, xy2, {}); -}; +}); + +});