Skip to content

Commit

Permalink
fix: test fail
Browse files Browse the repository at this point in the history
  • Loading branch information
kasmine committed Feb 8, 2021
1 parent 056246c commit c2685a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions __tests__/unit/plots/bar/change-data-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ describe('bar', () => {
const elements = dualAxes.chart.geometries[0].elements;
expect(elements.length).toBe(data.length);
expect(elements[0].shape.attr('fill')).toBe(elements[1].shape.attr('fill'));
expect(elements[0].getModel().data).toMatchObject(data[0]);
expect(elements[1].getModel().data).toEqual(data[2]);
// 从下至上绘制
expect(elements[0].getModel().data).toMatchObject(data[data.length - 1]);
expect(elements[1].getModel().data).toEqual(data[data.length - 2]);

dualAxes.destroy();
});
Expand Down

0 comments on commit c2685a8

Please sign in to comment.