X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fmulti_csv.js;h=c6b8d4f959fec1ad75b71f626ff91e79aae7ef79;hb=a4c3ece0a11e4e5c4f1f51a8bc8b7878d34ee052;hp=764c402e3aa0ceb3e94239bdde9f8721c02cf5ff;hpb=8021c59f150292bf1a12534e5092451140e49c77;p=dygraphs.git diff --git a/auto_tests/tests/multi_csv.js b/auto_tests/tests/multi_csv.js index 764c402..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', '1', '2'], 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', '1', '2'], getXLabels()); + assert.deepEqual(['0', '1', '2'], getXLabels()); g.updateOptions({file: data}); - assertEquals(['0', '1', '2'], getXLabels()); -}; + assert.deepEqual(['0', '1', '2'], getXLabels()); +}); + +});