test: lint

This commit is contained in:
Benjamin Canac
2024-04-12 14:00:58 +02:00
parent 9993b6727a
commit 290e4ce150
6 changed files with 40 additions and 43 deletions

View File

@@ -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()
})