Skip to content

Commit 3afd326

Browse files
committed
test: update test config
1 parent b365b92 commit 3afd326

52 files changed

Lines changed: 1657 additions & 2218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

__tests__/plots/bidirectional-bar.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import BidirectionalBarChart from '../../src/plots/bidirectional-bar'
44

55
describe('BidirectionalBarChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<BidirectionalBarChart xField="a" yField={['b', 'c']} data={[]} />
9-
)
7+
const renderer = create(<BidirectionalBarChart xField="a" yField={['b', 'c']} data={[]} />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/bullet.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('BulletChart', () => {
1515
measureField="x"
1616
rangeField="y"
1717
targetField="z"
18-
/>
18+
/>,
1919
)
2020

2121
expect(renderer.toJSON()).toMatchSnapshot()

__tests__/plots/chord.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import ChordChart from '../../src/plots/chord'
44

55
describe('ChordChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<ChordChart data={[]} sourceField="x" targetField="y" weightField="z" />
9-
)
7+
const renderer = create(<ChordChart data={[]} sourceField="x" targetField="y" weightField="z" />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/dual-axes.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import DualAxesChart from '../../src/plots/dual-axes'
44

55
describe('DualAxesChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<DualAxesChart data={[]} xField="x" yField={['y', 'z']} />
9-
)
7+
const renderer = create(<DualAxesChart data={[]} xField="x" yField={['y', 'z']} />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/heatmap.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import HeatmapChart from '../../src/plots/heatmap'
44

55
describe('HeatmapChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<HeatmapChart data={[]} colorField="x" xField="a" yField="b" />
9-
)
7+
const renderer = create(<HeatmapChart data={[]} colorField="x" xField="a" yField="b" />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/line.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable @typescript-eslint/ban-ts-comment */
2+
import { Plot as BasePlot, LineOptions } from '@antv/g2plot'
23
import React, { createRef } from 'react'
34
import { createRoot } from 'react-dom/client'
4-
import { create, act } from 'react-test-renderer'
5+
import { act, create } from 'react-test-renderer'
56
import LineChart from '../../src/plots/line'
6-
import { LineOptions, Plot as BasePlot } from '@antv/g2plot'
77

88
let div
99
let root

__tests__/plots/sankey.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import SankeyChart from '../../src/plots/sankey'
44

55
describe('SankeyChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<SankeyChart sourceField="s" targetField="t" weightField="w" data={[]} />
9-
)
7+
const renderer = create(<SankeyChart sourceField="s" targetField="t" weightField="w" data={[]} />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/stock.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import StockChart from '../../src/plots/stock'
44

55
describe('StockChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<StockChart data={[]} xField="x" yField={['a', 'b', 'c', 'd']} />
9-
)
7+
const renderer = create(<StockChart data={[]} xField="x" yField={['a', 'b', 'c', 'd']} />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

__tests__/plots/word-cloud.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import WordCloudChart from '../../src/plots/word-cloud'
44

55
describe('WordCloudChart', () => {
66
test('should render without crashed', () => {
7-
const renderer = create(
8-
<WordCloudChart data={[]} wordField="w" weightField="weight" />
9-
)
7+
const renderer = create(<WordCloudChart data={[]} wordField="w" weightField="weight" />)
108

119
expect(renderer.toJSON()).toMatchSnapshot()
1210
})

babel.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ module.exports = {
99
},
1010
],
1111
],
12-
ignore: ['src/.umi/**/*.ts'],
1312
}

0 commit comments

Comments
 (0)