feat(Skeleton): add as prop (#1955)

This commit is contained in:
Juho Rutila
2024-07-10 14:58:01 +03:00
committed by GitHub
parent cf482581f4
commit bce94db9fd
3 changed files with 9 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ import ComponentRender from '../component-render'
describe('Skeleton', () => {
it.each([
[ 'basic case', { } ],
[ '<USkeleton class="h-12 w-12" :ui="{ rounded: \'rounded-full\' }" />' ]
[ '<USkeleton class="h-12 w-12" :ui="{ rounded: \'rounded-full\' }" />' ],
[ '<USkeleton as="span" />' ]
])('renders %s correctly', async (nameOrHtml: string, options?: TypeOf<typeof USkeleton.props>) => {
const html = await ComponentRender(nameOrHtml, options, USkeleton)
expect(html).toMatchSnapshot()