Files
ui/test/components/layout/Skeleton.spec.ts
Daniel Roe 1a1c640220 chore: migrate to @nuxt/test-utils alpha (#1133)
* 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
2023-12-19 11:37:57 +01:00

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