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 Input, { type InputProps } from '../../src/runtime/components/Input.vue'
import Input, { type InputProps, type InputSlots } from '../../src/runtime/components/Input.vue'
import ComponentRender from '../component-render'
import theme from '#build/ui/input'
@@ -33,7 +33,7 @@ describe('Input', () => {
['with default slot', { slots: { default: () => 'Default slot' } }],
['with leading slot', { slots: { leading: () => 'Leading slot' } }],
['with trailing slot', { slots: { trailing: () => 'Trailing slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: any }) => {
])('renders %s correctly', async (nameOrHtml: string, options: { props?: InputProps, slots?: Partial<InputSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, Input)
expect(html).toMatchSnapshot()
})