Files
ui/test/components/Skeleton.spec.ts
2024-03-12 18:22:55 +01:00

13 lines
538 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 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()
})
})