Commit c6e719ac authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix spec

parent 1b4dd571
......@@ -34,6 +34,7 @@ function initChart(chart, args, done) {
window.d3 = chart.internal.d3;
window.d3.select('.jasmine_html-reporter')
.style('position', 'absolute')
.style('width', '640px')
.style('right', 0);
}
......
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 () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment