|
|
|
@ -1,26 +1,29 @@
|
|
|
|
|
describe('c3 chart data', function () { |
|
|
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
var chart; |
|
|
|
|
|
|
|
|
|
var args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
|
['data2', 50, 20, 10, 40, 15, 25], |
|
|
|
|
['data3', 150, 120, 110, 140, 115, 125] |
|
|
|
|
], |
|
|
|
|
order: function () { |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
var chart, args; |
|
|
|
|
|
|
|
|
|
beforeEach(function (done) { |
|
|
|
|
chart = window.initChart(chart, args, done); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('function in data.order', function () { |
|
|
|
|
it('should update args', function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
|
['data2', 50, 20, 10, 40, 15, 25], |
|
|
|
|
['data3', 150, 120, 110, 140, 115, 125] |
|
|
|
|
], |
|
|
|
|
order: function () { |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
it('should return false in isOrderAsc and isOrderDesc functions', function () { |
|
|
|
|
expect(chart.internal.isOrderAsc() || chart.internal.isOrderDesc()).toBe(false); |
|
|
|
|
}); |
|
|
|
@ -28,6 +31,19 @@ describe('c3 chart data', function () {
|
|
|
|
|
|
|
|
|
|
describe('data.xs', function () { |
|
|
|
|
|
|
|
|
|
it('should update args', function () { |
|
|
|
|
args = { |
|
|
|
|
data: { |
|
|
|
|
columns: [ |
|
|
|
|
['data1', 30, 200, 100, 400, 150, 250], |
|
|
|
|
['data2', 50, 20, 10, 40, 15, 25], |
|
|
|
|
['data3', 150, 120, 110, 140, 115, 125] |
|
|
|
|
], |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
expect(true).toBeTruthy(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
describe('normal x', function () { |
|
|
|
|
|
|
|
|
|
it('should have correct number of xs for each', function () { |
|
|
|
|