mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 09:50:33 +01:00
test: type options slots
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import Container, { type ContainerProps } from '../../src/runtime/components/Container.vue'
|
||||
import Container, { type ContainerProps, type ContainerSlots } from '../../src/runtime/components/Container.vue'
|
||||
import ComponentRender from '../component-render'
|
||||
|
||||
describe('Container', () => {
|
||||
@@ -9,7 +9,7 @@ describe('Container', () => {
|
||||
['with class', { props: { class: 'max-w-5xl' } }],
|
||||
// Slots
|
||||
['with default slot', { slots: { default: () => 'Default slot' } }]
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContainerProps, slots?: any }) => {
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContainerProps, slots?: Partial<ContainerSlots> }) => {
|
||||
const html = await ComponentRender(nameOrHtml, options, Container)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user