mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 17:30:37 +01:00
test: type options slots
This commit is contained in:
@@ -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()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user