X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fsimple_drawing.js;h=2ef84f3d9425b77782de3f54d83150c87dbc213d;hb=34b957edacfc4af7c35d370bd8eb690ee7ab7a62;hp=bda0e84f5e8de2b6bf11b335f67f2e7929ca225c;hpb=1b7afc93886e2927b6f320e8e1ed4dd6bd9ab53b;p=dygraphs.git diff --git a/auto_tests/tests/simple_drawing.js b/auto_tests/tests/simple_drawing.js index bda0e84..2ef84f3 100644 --- a/auto_tests/tests/simple_drawing.js +++ b/auto_tests/tests/simple_drawing.js @@ -24,21 +24,19 @@ * @author konigsberg@google.com (Robert Konigsberg) */ -describe("simple-drawing", function() { +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; -var ZERO_TO_FIFTY = 'X,Y\n10,0\n20,50'; +import CanvasAssertions from './CanvasAssertions'; +import Proxy from './Proxy'; +import PixelSampler from './PixelSampler'; -var _origFunc = Dygraph.getContext; -beforeEach(function() { - document.body.innerHTML = "
"; - Dygraph.getContext = function(canvas) { - return new Proxy(_origFunc(canvas)); - } -}); +describe("simple-drawing", function() { -afterEach(function() { - Dygraph.getContext = _origFunc; -}); +cleanupAfterEach(); +useProxyCanvas(utils, Proxy); + +var ZERO_TO_FIFTY = 'X,Y\n10,0\n20,50'; it('testDrawSimpleRangePlusOne', function() { var opts = {