tldraw/__tests__/dashes.test.ts

34 lines
1.1 KiB
TypeScript
Raw Normal View History

import { getPerfectDashProps } from 'utils'
2021-06-22 18:13:16 +00:00
describe('ellipse dash props', () => {
it('renders dashed props on a circle correctly', () => {
expect(getPerfectDashProps(100, 4, 'dashed')).toMatchSnapshot(
'small dashed circle dash props'
)
expect(getPerfectDashProps(100, 4, 'dashed')).toMatchSnapshot(
'small dashed ellipse dash props'
)
expect(getPerfectDashProps(200, 8, 'dashed')).toMatchSnapshot(
'large dashed circle dash props'
)
expect(getPerfectDashProps(200, 8, 'dashed')).toMatchSnapshot(
'large dashed ellipse dash props'
)
})
it('renders dotted props on a circle correctly', () => {
expect(getPerfectDashProps(100, 4, 'dotted')).toMatchSnapshot(
'small dotted circle dash props'
)
expect(getPerfectDashProps(100, 4, 'dotted')).toMatchSnapshot(
'small dotted ellipse dash props'
)
expect(getPerfectDashProps(200, 8, 'dotted')).toMatchSnapshot(
'large dotted circle dash props'
)
expect(getPerfectDashProps(200, 8, 'dotted')).toMatchSnapshot(
'large dotted ellipse dash props'
)
})
})