Remove duplicate tests (#7568)

This commit is contained in:
Ben McCann
2020-07-06 06:35:30 -07:00
committed by Evert Timberg
parent 71f313facb
commit 291000a291

View File

@@ -187,47 +187,6 @@ describe('Time scale tests', function() {
});
});
describe('when specifying limits in a deprecated fashion', function() {
var mockData = {
labels: ['2015-01-01T20:00:00', '2015-01-02T20:00:00', '2015-01-03T20:00:00'],
};
var config;
beforeEach(function() {
config = Chart.helpers.clone(Chart.scaleService.getScaleDefaults('time'));
config.ticks.source = 'labels';
config.time.unit = 'day';
});
it('should use the min option when less than first label for building ticks', function() {
config.min = '2014-12-29T04:00:00';
var labels = getLabels(createScale(mockData, config));
expect(labels[0]).toEqual('Jan 1');
});
it('should use the min option when greater than first label for building ticks', function() {
config.min = '2015-01-02T04:00:00';
var labels = getLabels(createScale(mockData, config));
expect(labels[0]).toEqual('Jan 2');
});
it('should use the max option when greater than last label for building ticks', function() {
config.max = '2015-01-05T06:00:00';
var labels = getLabels(createScale(mockData, config));
expect(labels[labels.length - 1]).toEqual('Jan 3');
});
it('should use the max option when less than last label for building ticks', function() {
config.max = '2015-01-02T23:00:00';
var labels = getLabels(createScale(mockData, config));
expect(labels[labels.length - 1]).toEqual('Jan 2');
});
});
it('should use the isoWeekday option', function() {
var mockData = {
labels: [