projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Down with gulp
[dygraphs.git]
/
auto_tests
/
tests
/
no_hours.js
diff --git
a/auto_tests/tests/no_hours.js
b/auto_tests/tests/no_hours.js
index
1fde9ef
..
bcfc1fe
100644
(file)
--- a/
auto_tests/tests/no_hours.js
+++ b/
auto_tests/tests/no_hours.js
@@
-5,16
+5,15
@@
*
* @author danvk@google.com (Dan Vanderkam)
*/
*
* @author danvk@google.com (Dan Vanderkam)
*/
-var noHoursTestCase = TestCase("no-hours");
-noHoursTestCase.prototype.setUp = function() {
- document.body.innerHTML = "<div id='graph'></div>";
-};
+import Dygraph from '../../src/dygraph';
+import Util from './Util';
-noHoursTestCase.prototype.tearDown = function() {
-};
+describe("no-hours", function() {
-noHoursTestCase.prototype.testNoHours = function() {
+cleanupAfterEach();
+
+it('testNoHours', function() {
var opts = {
width: 480,
height: 320
var opts = {
width: 480,
height: 320
@@
-30,19
+29,19
@@
noHoursTestCase.prototype.testNoHours = function() {
var g = new Dygraph(graph, data, opts);
g.setSelection(0);
var g = new Dygraph(graph, data, opts);
g.setSelection(0);
- assert
Equals
("2012/03/13: Y: -1", Util.getLegend());
+ assert
.equal
("2012/03/13: Y: -1", Util.getLegend());
g.setSelection(1);
g.setSelection(1);
- assert
Equals
("2012/03/14: Y: 0", Util.getLegend());
+ assert
.equal
("2012/03/14: Y: 0", Util.getLegend());
g.setSelection(2);
g.setSelection(2);
- assert
Equals
("2012/03/15: Y: 1", Util.getLegend());
+ assert
.equal
("2012/03/15: Y: 1", Util.getLegend());
g.setSelection(3);
g.setSelection(3);
- assert
Equals
("2012/03/16: Y: 0", Util.getLegend());
-};
+ assert
.equal
("2012/03/16: Y: 0", Util.getLegend());
+}
)
;
-
noHoursTestCase.prototype.testNoHoursDashed =
function() {
+
it('testNoHoursDashed',
function() {
var opts = {
width: 480,
height: 320
var opts = {
width: 480,
height: 320
@@
-58,15
+57,17
@@
noHoursTestCase.prototype.testNoHoursDashed = function() {
var g = new Dygraph(graph, data, opts);
g.setSelection(0);
var g = new Dygraph(graph, data, opts);
g.setSelection(0);
- assert
Equals
("2012/03/13: Y: -1", Util.getLegend());
+ assert
.equal
("2012/03/13: Y: -1", Util.getLegend());
g.setSelection(1);
g.setSelection(1);
- assert
Equals
("2012/03/14: Y: 0", Util.getLegend());
+ assert
.equal
("2012/03/14: Y: 0", Util.getLegend());
g.setSelection(2);
g.setSelection(2);
- assert
Equals
("2012/03/15: Y: 1", Util.getLegend());
+ assert
.equal
("2012/03/15: Y: 1", Util.getLegend());
g.setSelection(3);
g.setSelection(3);
- assertEquals("2012/03/16: Y: 0", Util.getLegend());
-};
+ assert.equal("2012/03/16: Y: 0", Util.getLegend());
+});
+
+});