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)
8 describe("no-hours", function() {
10 beforeEach(function() {
11 document
.body
.innerHTML
= "<div id='graph'></div>";
14 afterEach(function() {
17 it('testNoHours', function() {
22 var data
= "Date,Y\n" +
29 var graph
= document
.getElementById("graph");
30 var g
= new Dygraph(graph
, data
, opts
);
33 assert
.equal("2012/03/13: Y: -1", Util
.getLegend());
36 assert
.equal("2012/03/14: Y: 0", Util
.getLegend());
39 assert
.equal("2012/03/15: Y: 1", Util
.getLegend());
42 assert
.equal("2012/03/16: Y: 0", Util
.getLegend());
45 it('testNoHoursDashed', function() {
50 var data
= "Date,Y\n" +
57 var graph
= document
.getElementById("graph");
58 var g
= new Dygraph(graph
, data
, opts
);
61 assert
.equal("2012/03/13: Y: -1", Util
.getLegend());
64 assert
.equal("2012/03/14: Y: 0", Util
.getLegend());
67 assert
.equal("2012/03/15: Y: 1", Util
.getLegend());
70 assert
.equal("2012/03/16: Y: 0", Util
.getLegend());