mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
5cb65cfbd0
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
19 lines
781 B
TypeScript
19 lines
781 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import PageList from '../../src/runtime/components/PageList.vue'
|
|
import type { PageListProps, PageListSlots } from '../../src/runtime/components/PageList.vue'
|
|
import ComponentRender from '../component-render'
|
|
|
|
describe('PageList', () => {
|
|
it.each([
|
|
// Props
|
|
['with as', { props: { as: 'div' } }],
|
|
['with divide', { props: { divide: true } }],
|
|
['with class', { props: { class: 'gap-2' } }],
|
|
// Slots
|
|
['with default slot', { slots: { default: () => 'Default slot' } }]
|
|
])('renders %s correctly', async (nameOrHtml: string, options: { props?: PageListProps, slots?: Partial<PageListSlots> }) => {
|
|
const html = await ComponentRender(nameOrHtml, options, PageList)
|
|
expect(html).toMatchSnapshot()
|
|
})
|
|
})
|