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,6 +1,6 @@
import { describe, it, expect, test } from 'vitest'
import { mount } from '@vue/test-utils'
import Textarea, { type TextareaProps } from '../../src/runtime/components/Textarea.vue'
import Textarea, { type TextareaProps, type TextareaSlots } from '../../src/runtime/components/Textarea.vue'
import ComponentRender from '../component-render'
import theme from '#build/ui/textarea'
@@ -24,7 +24,7 @@ describe('Textarea', () => {
['with ui', { props: { ui: { wrapper: 'ms-4' } } }],
// Slots
['with default slot', { slots: { default: () => 'Default slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: any }) => {
])('renders %s correctly', async (nameOrHtml: string, options: { props?: TextareaProps, slots?: Partial<TextareaSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, Textarea)
expect(html).toMatchSnapshot()
})