X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=auto_tests%2Ftests%2Fconnect_separated_points.js;h=7b9fe4c32e5aca34e9d3c66c0c0d1c75d0ed5115;hb=50522d1b2b07c6034be6304b8efc5dd3d154e2db;hp=c104299b87fc7579badfdd559accd427f1025a57;hpb=89fdcedbda6906d90e15d84285c4f6c0b8d96d28;p=dygraphs.git diff --git a/auto_tests/tests/connect_separated_points.js b/auto_tests/tests/connect_separated_points.js index c104299..7b9fe4c 100644 --- a/auto_tests/tests/connect_separated_points.js +++ b/auto_tests/tests/connect_separated_points.js @@ -3,17 +3,20 @@ * * @author julian.eichstaedt@ch.sauter-bc.com (Fr. Sauter AG) */ + +import Dygraph from '../../src/dygraph'; +import * as utils from '../../src/dygraph-utils'; +import CanvasAssertions from './CanvasAssertions'; +import Proxy from './Proxy'; + describe("connect-separated-points", 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)); }; }); @@ -359,7 +362,7 @@ it('testConnectSeparatedPointsPerSeries', function() { CanvasAssertions.numLinesDrawn(htx, "#ff0000"), CanvasAssertions.numLinesDrawn(htx, "#00ff00"), CanvasAssertions.numLinesDrawn(htx, "#0000ff")]; - assert.equal(expected, actual); + assert.deepEqual(expected, actual); } var g = new Dygraph(document.getElementById("graph"),