mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 02:40:35 +01:00
test: lint
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { defu } from 'defu'
|
||||
import Checkbox, { type CheckboxProps } from '../../src/runtime/components/Checkbox.vue'
|
||||
import ComponentRender from '../component-render'
|
||||
import { defu } from 'defu'
|
||||
|
||||
describe('Checkbox', () => {
|
||||
it.each([
|
||||
@@ -16,15 +16,14 @@ describe('Checkbox', () => {
|
||||
['with indeterminate', { props: { indeterminate: true } }],
|
||||
['with help', { props: { label: 'Label', help: 'Help' } }],
|
||||
['with required', { props: { label: 'Label', required: true } }],
|
||||
['with custom color', { props: { label: 'Label', color: 'red' } }],
|
||||
['with custom color', { props: { label: 'Label', color: 'red' as const } }],
|
||||
['with size 2xs', { props: { size: '2xs' as const } }],
|
||||
['with size xs', { props: { size: 'xs' as const } }],
|
||||
['with size sm', { props: { size: 'sm' as const } }],
|
||||
['with size md', { props: { size: 'md' as const } }],
|
||||
['with size lg', { props: { size: 'lg' as const } }],
|
||||
['with size xl', { props: { size: 'xl' as const } }]
|
||||
// @ts-ignore
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps }) => {
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: any }) => {
|
||||
const html = await ComponentRender(nameOrHtml, defu(options, { props: { id: 42 } }), Checkbox)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user