bcfc1feb956834f1f87ca50fa57241dbcf164a1f
2 * @fileoverview Tests that we don'show specify hours, minutes or seconds
3 * in your dates if you don't specify them. This can get mixed up becaues of
6 * @author danvk@google.com (Dan Vanderkam)
9 import Dygraph from
'../../src/dygraph';
10 import Util from
'./Util';
12 describe("no-hours", function() {
16 it('testNoHours', function() {
21 var data
= "Date,Y\n" +
28 var graph
= document
.getElementById("graph");
29 var g
= new Dygraph(graph
, data
, opts
);
32 assert
.equal("2012/03/13: Y: -1", Util
.getLegend());
35 assert
.equal("2012/03/14: Y: 0", Util
.getLegend());
38 assert
.equal("2012/03/15: Y: 1", Util
.getLegend());
41 assert
.equal("2012/03/16: Y: 0", Util
.getLegend());
44 it('testNoHoursDashed', function() {
49 var data
= "Date,Y\n" +
56 var graph
= document
.getElementById("graph");
57 var g
= new Dygraph(graph
, data
, opts
);
60 assert
.equal("2012/03/13: Y: -1", Util
.getLegend());
63 assert
.equal("2012/03/14: Y: 0", Util
.getLegend());
66 assert
.equal("2012/03/15: Y: 1", Util
.getLegend());
69 assert
.equal("2012/03/16: Y: 0", Util
.getLegend());