Skip to content

Commit d9fc8d8

Browse files
committed
feat: add new chart
1 parent e81836d commit d9fc8d8

File tree

16 files changed

+417
-39
lines changed

16 files changed

+417
-39
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`BoxChart should render without crashed 1`] = `<div />`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`DualAxesChart should render without crashed 1`] = `<div />`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`StockChart should render without crashed 1`] = `<div />`;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`SunburstChart should render without crashed 1`] = `<div />`;

__tests__/plots/box.spec.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react'
2+
import { create } from 'react-test-renderer'
3+
import BoxChart from '../../src/plots/box'
4+
5+
describe('BoxChart', () => {
6+
test('should render without crashed', () => {
7+
const renderer = create(<BoxChart data={[]} xField="x" yField="y" />)
8+
9+
expect(renderer.toJSON()).toMatchSnapshot()
10+
})
11+
})

__tests__/plots/dual-axes.spec.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react'
2+
import { create } from 'react-test-renderer'
3+
import DualAxesChart from '../../src/plots/dual-axes'
4+
5+
describe('DualAxesChart', () => {
6+
test('should render without crashed', () => {
7+
const renderer = create(
8+
<DualAxesChart data={[]} xField="x" yField={['y', 'z']} />
9+
)
10+
11+
expect(renderer.toJSON()).toMatchSnapshot()
12+
})
13+
})

__tests__/plots/stock.spec.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react'
2+
import { create } from 'react-test-renderer'
3+
import StockChart from '../../src/plots/stock'
4+
5+
describe('StockChart', () => {
6+
test('should render without crashed', () => {
7+
const renderer = create(
8+
<StockChart data={[]} xField="x" yField={['a', 'b', 'c', 'd']} />
9+
)
10+
11+
expect(renderer.toJSON()).toMatchSnapshot()
12+
})
13+
})

__tests__/plots/sunburst.spec.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react'
2+
import { create } from 'react-test-renderer'
3+
import SunburstChart from '../../src/plots/sunburst'
4+
5+
describe('SunburstChart', () => {
6+
test('should render without crashed', () => {
7+
const renderer = create(<SunburstChart data={[]} />)
8+
9+
expect(renderer.toJSON()).toMatchSnapshot()
10+
})
11+
})

0 commit comments

Comments
 (0)