Skip to content

Commit da143bb

Browse files
committed
test: fix test case
1 parent d9b8ea2 commit da143bb

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

__tests__/plots/bullet.spec.tsx

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { BulletOptions } from '@antv/g2plot'
12
import { mount } from '@vue/test-utils'
23
import BulletChart from '../../src/plots/bullet'
34

4-
const props: any = {
5+
const props: BulletOptions = {
56
data: [
67
{
78
title: '满意度',
@@ -29,27 +30,10 @@ const props: any = {
2930
line: null,
3031
},
3132
yAxis: false,
32-
// 自定义 legend
33-
legend: {
34-
custom: true,
35-
position: 'left',
36-
items: [
37-
{
38-
value: '实际值',
39-
name: '实际值',
40-
marker: { symbol: 'square', style: { fill: '#5B8FF9', r: 5 } },
41-
},
42-
{
43-
value: '目标值',
44-
name: '目标值',
45-
marker: { symbol: 'line', style: { stroke: '#5B8FF9', r: 5 } },
46-
},
47-
],
48-
},
4933
}
5034

5135
describe('BulletChart', () => {
5236
test('should render without crashed', () => {
53-
mount(() => <BulletChart {...props} />)
37+
mount(() => <BulletChart {...(props as any)} />)
5438
})
5539
})

0 commit comments

Comments
 (0)