X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fto_dom_coords.js;h=454050115bb6af37fef85f740ac2a9bcb6969997;hb=ce31caf22475e3e1fd6d9fea192d61ff4fcd7fac;hp=5aa452018d61308c6dab3c7592a0dbeaa715eca0;hpb=8bd58e55cfd7d903d68ec434be1f17f78dc11de1;p=dygraphs.git diff --git a/auto_tests/tests/to_dom_coords.js b/auto_tests/tests/to_dom_coords.js index 5aa4520..4540501 100644 --- a/auto_tests/tests/to_dom_coords.js +++ b/auto_tests/tests/to_dom_coords.js @@ -3,20 +3,17 @@ * * @author danvk@google.com (Dan Vanderkam) */ +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; -describe("to-dom-coords", function() { +import Proxy from './Proxy'; +import CanvasAssertions from './CanvasAssertions'; +import {assertDeepCloseTo} from './custom_asserts'; -var origFunc = Dygraph.getContext; -beforeEach(function() { - document.body.innerHTML = "
"; - Dygraph.getContext = function(canvas) { - return new Proxy(origFunc(canvas)); - } -}); +describe("to-dom-coords", function() { -afterEach(function() { - Dygraph.getContext = origFunc; -}); +cleanupAfterEach(); +useProxyCanvas(utils, Proxy); // Checks that toDomCoords and toDataCoords are inverses of one another. var checkForInverses = function(g) {