mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
* test: update snapshots to remove quotes * chore: add alpha versions of test-utils * chore: migrate to new test format * test: slightly improve typing in suite * test: improve safety of basic test
15 lines
534 B
TypeScript
15 lines
534 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import { USkeleton } from '#components'
|
|
import type { TypeOf } from 'zod'
|
|
import ComponentRender from '../component-render'
|
|
|
|
describe('Skeleton', () => {
|
|
it.each([
|
|
[ 'basic case', { } ],
|
|
[ '<USkeleton class="h-12 w-12" :ui="{ rounded: \'rounded-full\' }" />' ]
|
|
])('renders %s correctly', async (nameOrHtml: string, options?: TypeOf<typeof USkeleton.props>) => {
|
|
const html = await ComponentRender(nameOrHtml, options, USkeleton)
|
|
expect(html).toMatchSnapshot()
|
|
})
|
|
})
|