Commit 67d7ec16 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix travis

parent 31a67df5
...@@ -742,7 +742,7 @@ describe('c3 chart axis', function () { ...@@ -742,7 +742,7 @@ describe('c3 chart axis', function () {
it('should not have inner y axis', function () { it('should not have inner y axis', function () {
var paddingRight = chart.internal.getCurrentPaddingRight(), var paddingRight = chart.internal.getCurrentPaddingRight(),
tickTexts = chart.internal.main.selectAll('.c3-axis-2y g.tick text'); tickTexts = chart.internal.main.selectAll('.c3-axis-2y g.tick text');
expect(paddingRight).toBe(40); expect(paddingRight).toBeGreaterThan(39);
tickTexts.each(function () { tickTexts.each(function () {
expect(+d3.select(this).attr('x')).toBeGreaterThan(0); expect(+d3.select(this).attr('x')).toBeGreaterThan(0);
}); });
......
...@@ -199,8 +199,8 @@ describe('c3 chart data', function () { ...@@ -199,8 +199,8 @@ describe('c3 chart data', function () {
expectedXs = [74, 221, 368, 515]; expectedXs = [74, 221, 368, 515];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -221,8 +221,8 @@ describe('c3 chart data', function () { ...@@ -221,8 +221,8 @@ describe('c3 chart data', function () {
expectedXs = [6, 198, 391, 583]; expectedXs = [6, 198, 391, 583];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -250,8 +250,8 @@ describe('c3 chart data', function () { ...@@ -250,8 +250,8 @@ describe('c3 chart data', function () {
expectedXs = [490, 516, 490, 4]; expectedXs = [490, 516, 490, 4];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -272,8 +272,8 @@ describe('c3 chart data', function () { ...@@ -272,8 +272,8 @@ describe('c3 chart data', function () {
expectedXs = [76, 526, 76, 4]; expectedXs = [76, 526, 76, 4];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -317,8 +317,8 @@ describe('c3 chart data', function () { ...@@ -317,8 +317,8 @@ describe('c3 chart data', function () {
expectedXs = [74, 221, 368, 515]; expectedXs = [74, 221, 368, 515];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -339,8 +339,8 @@ describe('c3 chart data', function () { ...@@ -339,8 +339,8 @@ describe('c3 chart data', function () {
expectedXs = [6, 198, 391, 583]; expectedXs = [6, 198, 391, 583];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -368,8 +368,8 @@ describe('c3 chart data', function () { ...@@ -368,8 +368,8 @@ describe('c3 chart data', function () {
expectedXs = [103, 78, 103, 526]; expectedXs = [103, 78, 103, 526];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -390,8 +390,8 @@ describe('c3 chart data', function () { ...@@ -390,8 +390,8 @@ describe('c3 chart data', function () {
expectedXs = [511, 67, 511, 526]; expectedXs = [511, 67, 511, 526];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -435,8 +435,8 @@ describe('c3 chart data', function () { ...@@ -435,8 +435,8 @@ describe('c3 chart data', function () {
expectedXs = [74, 221, 368, 515]; expectedXs = [74, 221, 368, 515];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -457,8 +457,8 @@ describe('c3 chart data', function () { ...@@ -457,8 +457,8 @@ describe('c3 chart data', function () {
expectedXs = [6, 198, 391, 583]; expectedXs = [6, 198, 391, 583];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
}); });
...@@ -485,8 +485,8 @@ describe('c3 chart data', function () { ...@@ -485,8 +485,8 @@ describe('c3 chart data', function () {
expectedXs = [69, 525, 513, 295]; expectedXs = [69, 525, 513, 295];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -507,8 +507,8 @@ describe('c3 chart data', function () { ...@@ -507,8 +507,8 @@ describe('c3 chart data', function () {
expectedXs = [67, 527, 515, 297]; expectedXs = [67, 527, 515, 297];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
}); });
...@@ -547,8 +547,8 @@ describe('c3 chart data', function () { ...@@ -547,8 +547,8 @@ describe('c3 chart data', function () {
expectedXs = [74, 221, 368, 515]; expectedXs = [74, 221, 368, 515];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -569,8 +569,8 @@ describe('c3 chart data', function () { ...@@ -569,8 +569,8 @@ describe('c3 chart data', function () {
expectedXs = [6, 198, 391, 583]; expectedXs = [6, 198, 391, 583];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -598,8 +598,8 @@ describe('c3 chart data', function () { ...@@ -598,8 +598,8 @@ describe('c3 chart data', function () {
expectedXs = [57, 150, 77, 363]; expectedXs = [57, 150, 77, 363];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -620,8 +620,8 @@ describe('c3 chart data', function () { ...@@ -620,8 +620,8 @@ describe('c3 chart data', function () {
expectedXs = [107, 192, 125, 386]; expectedXs = [107, 192, 125, 386];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
}); });
...@@ -660,8 +660,8 @@ describe('c3 chart data', function () { ...@@ -660,8 +660,8 @@ describe('c3 chart data', function () {
expectedXs = [74, 221, 368, 515]; expectedXs = [74, 221, 368, 515];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -682,8 +682,8 @@ describe('c3 chart data', function () { ...@@ -682,8 +682,8 @@ describe('c3 chart data', function () {
expectedXs = [6, 198, 391, 583]; expectedXs = [6, 198, 391, 583];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -711,8 +711,8 @@ describe('c3 chart data', function () { ...@@ -711,8 +711,8 @@ describe('c3 chart data', function () {
expectedXs = [533, 440, 513, 230]; expectedXs = [533, 440, 513, 230];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
...@@ -733,8 +733,8 @@ describe('c3 chart data', function () { ...@@ -733,8 +733,8 @@ describe('c3 chart data', function () {
expectedXs = [480, 397, 462, 205]; expectedXs = [480, 397, 462, 205];
texts.each(function (d, i) { texts.each(function (d, i) {
var text = d3.select(this); var text = d3.select(this);
expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -1); expect(+text.attr('y')).toBeCloseTo(expectedYs[i], -2);
expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -1); expect(+text.attr('x')).toBeCloseTo(expectedXs[i], -2);
}); });
}); });
}); });
......
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