2021-07-01 22:11:09 +00:00
|
|
|
import { DashStyle } from 'types'
|
2021-07-01 14:03:02 +00:00
|
|
|
import { getPerfectDashProps } from 'utils'
|
2021-06-22 18:13:16 +00:00
|
|
|
|
|
|
|
describe('ellipse dash props', () => {
|
|
|
|
it('renders dashed props on a circle correctly', () => {
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(100, 4, DashStyle.Dashed)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'small dashed circle dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(100, 4, DashStyle.Dashed)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'small dashed ellipse dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(200, 8, DashStyle.Dashed)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'large dashed circle dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(200, 8, DashStyle.Dashed)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'large dashed ellipse dash props'
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
|
|
|
it('renders dotted props on a circle correctly', () => {
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(100, 4, DashStyle.Dotted)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'small dotted circle dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(100, 4, DashStyle.Dotted)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'small dotted ellipse dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(200, 8, DashStyle.Dotted)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'large dotted circle dash props'
|
|
|
|
)
|
2021-07-01 22:11:09 +00:00
|
|
|
expect(getPerfectDashProps(200, 8, DashStyle.Dotted)).toMatchSnapshot(
|
2021-06-22 18:13:16 +00:00
|
|
|
'large dotted ellipse dash props'
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|