X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Ffill_step_plot.js;fp=auto_tests%2Ftests%2Ffill_step_plot.js;h=1c4314555b54884babcaea28d8d630ea919b60d2;hb=e8c70e4e0f4c124a2c68eb43d6ec4e781d1bf810;hp=64060169e082ed4c93670616444ab4f3bbb483db;hpb=6ecc073934b76e5076f917112a24ff7094857730;p=dygraphs.git diff --git a/auto_tests/tests/fill_step_plot.js b/auto_tests/tests/fill_step_plot.js index 6406016..1c43145 100644 --- a/auto_tests/tests/fill_step_plot.js +++ b/auto_tests/tests/fill_step_plot.js @@ -4,23 +4,25 @@ * * @author benoitboivin.pro@gmail.com (Benoit Boivin) */ +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; +import CanvasAssertions from './CanvasAssertions'; +import Proxy from './Proxy'; + describe("fill-step-plot", function() { -beforeEach(function() { - document.body.innerHTML = "
"; -}); +cleanupAfterEach(); -var origFunc = Dygraph.getContext; +var origFunc = utils.getContext; beforeEach(function() { - document.body.innerHTML = "
"; - Dygraph.getContext = function(canvas) { + utils.getContext = function(canvas) { return new Proxy(origFunc(canvas)); }; }); afterEach(function() { - Dygraph.getContext = origFunc; + utils.getContext = origFunc; });