X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fmulti_csv.js;h=c6b8d4f959fec1ad75b71f626ff91e79aae7ef79;hb=9d3fcd6a7073787f5b994ed10d5bd53a9c1e64dc;hp=3594b1572a0822771978c16c478215d618bb3f04;hpb=01ebcbd470fbe8a6652195927c6585d4c854575b;p=dygraphs.git diff --git a/auto_tests/tests/multi_csv.js b/auto_tests/tests/multi_csv.js index 3594b15..c6b8d4f 100644 --- a/auto_tests/tests/multi_csv.js +++ b/auto_tests/tests/multi_csv.js @@ -3,14 +3,14 @@ * * @author dan@dygraphs.com (Dan Vanderkam) */ -var MultiCsvTestCase = TestCase("multi-csv"); +describe("multi-csv", function() { -MultiCsvTestCase.prototype.setUp = function() { +beforeEach(function() { document.body.innerHTML = "
"; -}; +}); -MultiCsvTestCase.prototype.tearDown = function() { -}; +afterEach(function() { +}); function getXLabels() { var x_labels = document.getElementsByClassName("dygraph-axis-label-x"); @@ -21,7 +21,7 @@ function getXLabels() { return ary; } -MultiCsvTestCase.prototype.testOneCSV = function() { +it('testOneCSV', function() { var opts = { width: 480, height: 320 @@ -36,10 +36,10 @@ MultiCsvTestCase.prototype.testOneCSV = function() { var graph = document.getElementById("graph"); var g = new Dygraph(graph, data, opts); - assertEquals(['0','0.5','1','1.5','2','2.5'], getXLabels()); -}; + assert.deepEqual(['0', '1', '2'], getXLabels()); +}); -MultiCsvTestCase.prototype.testTwoCSV = function() { +it('testTwoCSV', function() { var opts = { width: 480, height: 320 @@ -54,9 +54,11 @@ MultiCsvTestCase.prototype.testTwoCSV = function() { var graph = document.getElementById("graph"); var g = new Dygraph(graph, data, opts); - assertEquals(['0','0.5','1','1.5','2','2.5'], getXLabels()); + assert.deepEqual(['0', '1', '2'], getXLabels()); g.updateOptions({file: data}); - assertEquals(['0','0.5','1','1.5','2','2.5'], getXLabels()); -}; + assert.deepEqual(['0', '1', '2'], getXLabels()); +}); + +});