test: type options slots

This commit is contained in:
Benjamin Canac
2024-04-18 12:55:10 +02:00
parent 76e3d0b9f3
commit ae2aaa9d1a
44 changed files with 524 additions and 524 deletions

View File

@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
import Switch, { type SwitchProps } from '../../src/runtime/components/Switch.vue'
import Switch, { type SwitchProps, type SwitchSlots } from '../../src/runtime/components/Switch.vue'
import ComponentRender from '../component-render'
import theme from '#build/ui/switch'
@@ -29,7 +29,7 @@ describe('Switch', () => {
// Slots
['with label slot', { slots: { label: () => 'Label slot' } }],
['with description slot', { slots: { label: () => 'Description slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: SwitchProps, slots?: any }) => {
])('renders %s correctly', async (nameOrHtml: string, options: { props?: SwitchProps, slots?: Partial<SwitchSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, Switch)
expect(html).toMatchSnapshot()
})