Files
nuxt__ui/test/components/DashboardGroup.spec.ts
Benjamin Canac 5cb65cfbd0 feat: import @nuxt/ui-pro components (#4675)
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
2025-09-01 14:30:39 +02:00

18 lines
791 B
TypeScript

import { describe, it, expect } from 'vitest'
import DashboardGroup from '../../src/runtime/components/DashboardGroup.vue'
import type { DashboardGroupProps, DashboardGroupSlots } from '../../src/runtime/components/DashboardGroup.vue'
import ComponentRender from '../component-render'
describe('DashboardGroup', () => {
it.each([
// Props
['with as', { props: { as: 'section' } }],
['with class', { props: { class: 'inset-4' } }],
// Slots
['with default slot', { slots: { default: () => 'Default slot' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: DashboardGroupProps, slots?: Partial<DashboardGroupSlots> }) => {
const html = await ComponentRender(nameOrHtml, options, DashboardGroup)
expect(html).toMatchSnapshot()
})
})