Files
ui/test/components/Container.spec.ts
renovate[bot] 127e06ae83 chore(deps): update all non-major dependencies (v3) (#4443)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-07-02 11:39:23 +02:00

18 lines
748 B
TypeScript

import { describe, it, expect } from 'vitest'
import Container from '../../src/runtime/components/Container.vue'
import type { ContainerProps, ContainerSlots } from '../../src/runtime/components/Container.vue'
import ComponentRender from '../component-render'
describe('Container', () => {
it.each([
// Props
['with as', { props: { as: 'article' } }],
['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?: Partial<ContainerSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, Container)
expect(html).toMatchSnapshot()
})
})