X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fcustom_bars.js;h=ebc867a38a29732c48064c6dbc0879c5660045d6;hb=b4b9eeac8b116c18bbf6ebb0c4d542a3f8d2ce32;hp=cbffe7e76ee9d57a68301dfd10eed10204d94b9c;hpb=65129ba82d4efe12714be88fa3c792149c00ca10;p=dygraphs.git diff --git a/auto_tests/tests/custom_bars.js b/auto_tests/tests/custom_bars.js index cbffe7e..ebc867a 100644 --- a/auto_tests/tests/custom_bars.js +++ b/auto_tests/tests/custom_bars.js @@ -4,18 +4,25 @@ * @fileoverview Regression test based on some strange customBars data. * @author danvk@google.com (Dan Vanderkam) */ +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; +import CanvasAssertions from './CanvasAssertions'; +import PixelSampler from './PixelSampler'; +import Proxy from './Proxy'; + describe("custom-bars", function() { -var _origFunc = Dygraph.getContext; +cleanupAfterEach(); + +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; }); // This test used to reliably produce an infinite loop.