Skip to content

Commit

Permalink
refactor(v2/pie): 修改 cr 建议
Browse files Browse the repository at this point in the history
  • Loading branch information
visiky committed Jul 27, 2020
1 parent 683c02f commit f763e8d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions __tests__/bugs/issue-1245-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Pie } from '../../src';
import { createDiv } from '.././utils/dom';
import { delay } from '.././utils/delay';

describe('donut plot', () => {
test('angleField & colorField 配置交换, 不会触发 out-of-memory, 但是坐标为 NaN', () => {
Expand Down Expand Up @@ -90,12 +89,10 @@ describe('donut plot', () => {
expect(piePlot).toBeDefined();
expect(piePlot.chart.geometries[0].elements.length).toBe(data.length - 1);

delay(3000).then(() => {
piePlot.update({
...piePlot.options,
data: data.map((d, idx) => (idx !== 0 ? { ...d, value: null } : d)),
});
expect(piePlot.chart.geometries[0].elements.length).toBe(data.length);
piePlot.update({
...piePlot.options,
data: data.map((d, idx) => (idx !== 0 ? { ...d, value: null } : d)),
});
expect(piePlot.chart.geometries[0].elements.length).toBe(data.length);
});
});

0 comments on commit f763e8d

Please sign in to comment.