Skip to content

Commit

Permalink
change a few times to UTC in tests
Browse files Browse the repository at this point in the history
these may be harmless but we should consistently use UTC in all tests

for #1420
  • Loading branch information
gordonwoodhull committed Apr 19, 2018
1 parent 56a68d3 commit b30cf81
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions spec/bar-chart-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ describe('dc.barChart', function () {
chart = dc.barChart('#' + id);
chart.width(500)
.transitionDuration(0)
.x(d3.scaleTime())
.x(d3.scaleUtc())
.elasticY(true).elasticX(true)
.dimension(dimension)
.group(group);
Expand All @@ -1022,17 +1022,17 @@ describe('dc.barChart', function () {
it('should render the right xAxisMax/Min when 10 day padding', function () {
chart.xAxisPadding(10)
.render();
var expectedStartDate = d3.timeDay.offset(date, -10);
var expectedEndDate = d3.timeDay.offset(date, 10);
var expectedStartDate = d3.utcDay.offset(date, -10);
var expectedEndDate = d3.utcDay.offset(date, 10);
expect(chart.xAxisMin()).toEqual(expectedStartDate);
expect(chart.xAxisMax()).toEqual(expectedEndDate);
});
it('should render the right xAxisMax/Min when 2 month padding', function () {
chart.xAxisPaddingUnit('month')
.xAxisPadding(2)
.render();
var expectedStartDate = d3.timeMonth.offset(date, -2);
var expectedEndDate = d3.timeMonth.offset(date, 2);
var expectedStartDate = d3.utcMonth.offset(date, -2);
var expectedEndDate = d3.utcMonth.offset(date, 2);
expect(chart.xAxisMin()).toEqual(expectedStartDate);
expect(chart.xAxisMax()).toEqual(expectedEndDate);
});
Expand Down
16 changes: 8 additions & 8 deletions spec/biggish-data-spec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b30cf81

Please # to comment.