projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #657 from kbaggott/master
[dygraphs.git]
/
auto_tests
/
tests
/
multi_csv.js
diff --git
a/auto_tests/tests/multi_csv.js
b/auto_tests/tests/multi_csv.js
index
3594b15
..
c6b8d4f
100644
(file)
--- a/
auto_tests/tests/multi_csv.js
+++ b/
auto_tests/tests/multi_csv.js
@@
-3,14
+3,14
@@
*
* @author dan@dygraphs.com (Dan Vanderkam)
*/
*
* @author dan@dygraphs.com (Dan Vanderkam)
*/
-var MultiCsvTestCase = TestCase("multi-csv");
+describe("multi-csv", function() {
-
MultiCsvTestCase.prototype.setUp =
function() {
+
beforeEach(
function() {
document.body.innerHTML = "<div id='graph'></div>";
document.body.innerHTML = "<div id='graph'></div>";
-};
+}
)
;
-
MultiCsvTestCase.prototype.tearDown =
function() {
-};
+
afterEach(
function() {
+}
)
;
function getXLabels() {
var x_labels = document.getElementsByClassName("dygraph-axis-label-x");
function getXLabels() {
var x_labels = document.getElementsByClassName("dygraph-axis-label-x");
@@
-21,7
+21,7
@@
function getXLabels() {
return ary;
}
return ary;
}
-
MultiCsvTestCase.prototype.testOneCSV =
function() {
+
it('testOneCSV',
function() {
var opts = {
width: 480,
height: 320
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);
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, opts);
- assert
Equals(['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
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);
var graph = document.getElementById("graph");
var g = new Dygraph(graph, data, opts);
- assert
Equals(['0','0.5','1','1.5','2','2.5
'], getXLabels());
+ assert
.deepEqual(['0', '1', '2
'], getXLabels());
g.updateOptions({file: data});
g.updateOptions({file: data});
- assertEquals(['0','0.5','1','1.5','2','2.5'], getXLabels());
-};
+ assert.deepEqual(['0', '1', '2'], getXLabels());
+});
+
+});