Files
ui/test/components/Skeleton.spec.ts
Benjamin Canac 9a42fa415f chore: add eol
2024-03-13 16:58:11 +01:00

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()
})
})