mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 11:20:36 +01:00
test: type options slots
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import Checkbox, { type CheckboxProps } from '../../src/runtime/components/Checkbox.vue'
|
||||
import Checkbox, { type CheckboxProps, type CheckboxSlots } from '../../src/runtime/components/Checkbox.vue'
|
||||
import ComponentRender from '../component-render'
|
||||
import theme from '#build/ui/checkbox'
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('Checkbox', () => {
|
||||
// Slots
|
||||
['with label slot', { slots: { label: () => 'Label slot' } }],
|
||||
['with description slot', { slots: { label: () => 'Description slot' } }]
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: any }) => {
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: CheckboxProps, slots?: Partial<CheckboxSlots> }) => {
|
||||
const html = await ComponentRender(nameOrHtml, options, Checkbox)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user