projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump to version 2 🎉
[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
764c402
..
99008e2
100644
(file)
--- a/
auto_tests/tests/multi_csv.js
+++ b/
auto_tests/tests/multi_csv.js
@@
-3,14
+3,12
@@
*
* @author dan@dygraphs.com (Dan Vanderkam)
*/
*
* @author dan@dygraphs.com (Dan Vanderkam)
*/
-var MultiCsvTestCase = TestCase("multi-csv");
-MultiCsvTestCase.prototype.setUp = function() {
- document.body.innerHTML = "<div id='graph'></div>";
-};
+import Dygraph from '../../src/dygraph';
-MultiCsvTestCase.prototype.tearDown = function() {
-};
+describe("multi-csv", function() {
+
+cleanupAfterEach();
function getXLabels() {
var x_labels = document.getElementsByClassName("dygraph-axis-label-x");
function getXLabels() {
var x_labels = document.getElementsByClassName("dygraph-axis-label-x");
@@
-21,7
+19,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
+34,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', '1', '2'], 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
+52,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', '1', '2'], getXLabels());
+ assert
.deepEqual
(['0', '1', '2'], getXLabels());
g.updateOptions({file: data});
g.updateOptions({file: data});
- assertEquals(['0', '1', '2'], getXLabels());
-};
+ assert.deepEqual(['0', '1', '2'], getXLabels());
+});
+
+});