Skip to content

Commit

Permalink
fix: 修复单测问题
Browse files Browse the repository at this point in the history
  • Loading branch information
visiky committed Feb 7, 2022
1 parent 8f1c1ec commit 3408af0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion __tests__/unit/adaptor/geometries/base-spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { last } from '@antv/util';
import { P, Params } from '../../../../src';
import { geometry, GeometryOptions } from '../../../../src/adaptor/geometries/base';
import { partySupport } from '../../../data/party-support';
Expand Down Expand Up @@ -206,6 +207,10 @@ describe('adaptor - geometry', () => {
xField: 'date',
yField: 'value',
sizeField: 'value',
colorField: 'type',
meta: {
date: { type: 'cat' },
},
mapping: {
size: 10,
},
Expand Down Expand Up @@ -239,8 +244,9 @@ describe('adaptor - geometry', () => {
expect(plot.chart.geometries[0].getAttribute('size').values).toEqual([]);
expect(plot.chart.geometries[0].getAttribute('size').callback).toBeDefined();

const datum = last(plot.chart.getGeometries()[0].getElements()).getData();
expect(p).toEqual({
value: 1800,
value: datum.value,
});

plot.destroy();
Expand Down

0 comments on commit 3408af0

Please sign in to comment.