diff --git a/spec/arc-spec.js b/spec/arc-spec.js index e680217..517bf64 100644 --- a/spec/arc-spec.js +++ b/spec/arc-spec.js @@ -56,8 +56,11 @@ describe('c3 chart arc', function () { expect(true).toBeTruthy(); }); - it('should have correct d even if data id can be converted to a color', function () { - expect(d3.select('.c3-arc-black').attr('d')).toMatch(/M-124\..+,-171\..+A211\..+,211\..+ 0 0,1 -3\..+,-211\..+L0,0Z/); + it('should have correct d even if data id can be converted to a color', function (done) { + setTimeout(function () { + expect(d3.select('.c3-arc-black').attr('d')).toMatch(/M-124\..+,-171\..+A211\..+,211\..+ 0 0,1 -3\..+,-211\..+L0,0Z/); + done(); + }, 500); }); it('should update args to have empty pie chart', function () { diff --git a/spec/c3-helper.js b/spec/c3-helper.js index 967bb65..872ba06 100644 --- a/spec/c3-helper.js +++ b/spec/c3-helper.js @@ -39,7 +39,7 @@ function initChart(chart, args, done) { window.setTimeout(function () { done(); - }, 100); + }, 10); return chart; }