Skip to content

Commit b30cf81

Browse files
change a few times to UTC in tests
these may be harmless but we should consistently use UTC in all tests for #1420
1 parent 56a68d3 commit b30cf81

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

spec/bar-chart-spec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ describe('dc.barChart', function () {
10071007
chart = dc.barChart('#' + id);
10081008
chart.width(500)
10091009
.transitionDuration(0)
1010-
.x(d3.scaleTime())
1010+
.x(d3.scaleUtc())
10111011
.elasticY(true).elasticX(true)
10121012
.dimension(dimension)
10131013
.group(group);
@@ -1022,17 +1022,17 @@ describe('dc.barChart', function () {
10221022
it('should render the right xAxisMax/Min when 10 day padding', function () {
10231023
chart.xAxisPadding(10)
10241024
.render();
1025-
var expectedStartDate = d3.timeDay.offset(date, -10);
1026-
var expectedEndDate = d3.timeDay.offset(date, 10);
1025+
var expectedStartDate = d3.utcDay.offset(date, -10);
1026+
var expectedEndDate = d3.utcDay.offset(date, 10);
10271027
expect(chart.xAxisMin()).toEqual(expectedStartDate);
10281028
expect(chart.xAxisMax()).toEqual(expectedEndDate);
10291029
});
10301030
it('should render the right xAxisMax/Min when 2 month padding', function () {
10311031
chart.xAxisPaddingUnit('month')
10321032
.xAxisPadding(2)
10331033
.render();
1034-
var expectedStartDate = d3.timeMonth.offset(date, -2);
1035-
var expectedEndDate = d3.timeMonth.offset(date, 2);
1034+
var expectedStartDate = d3.utcMonth.offset(date, -2);
1035+
var expectedEndDate = d3.utcMonth.offset(date, 2);
10361036
expect(chart.xAxisMin()).toEqual(expectedStartDate);
10371037
expect(chart.xAxisMax()).toEqual(expectedEndDate);
10381038
});

spec/biggish-data-spec.js

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)