mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
15 lines
583 B
TypeScript
15 lines
583 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import Skeleton, { type SkeletonProps } from '../../src/runtime/components/Skeleton.vue'
|
|
import ComponentRender from '../component-render'
|
|
|
|
describe('Skeleton', () => {
|
|
it.each([
|
|
['basic case', {}],
|
|
['with as', { props: { as: 'span' } }],
|
|
['with class', { props: { class: 'rounded-full size-12' } }]
|
|
])('renders %s correctly', async (nameOrHtml: string, options: { props?: SkeletonProps, slots?: any }) => {
|
|
const html = await ComponentRender(nameOrHtml, options, Skeleton)
|
|
expect(html).toMatchSnapshot()
|
|
})
|
|
})
|