diff --git a/test/components/Badge.spec.ts b/test/components/Badge.spec.ts index 017d7910..727de921 100644 --- a/test/components/Badge.spec.ts +++ b/test/components/Badge.spec.ts @@ -5,6 +5,7 @@ import ComponentRender from '../component-render' describe('Badge', () => { it.each([ ['with label', { props: { label: 'Badge' } }], + ['with as', { props: { label: 'Badge', as: 'div' } }], ['with class', { props: { label: 'Badge', class: 'rounded-full font-bold' } }], ['with size xs', { props: { label: 'Badge', size: 'xs' as const } }], ['with size sm', { props: { label: 'Badge', size: 'sm' as const } }], diff --git a/test/components/Card.spec.ts b/test/components/Card.spec.ts index 9116075f..a2092dd4 100644 --- a/test/components/Card.spec.ts +++ b/test/components/Card.spec.ts @@ -5,6 +5,8 @@ import ComponentRender from '../component-render' describe('Card', () => { it.each([ ['basic case', {}], + ['with as', { props: { as: 'section' } }], + ['with class', { props: { class: 'rounded-xl' } }], ['with default slot', { slots: { default: () => 'Default slot' } }], ['with header slot', { slots: { header: () => 'Header slot' } }], ['with footer slot', { slots: { footer: () => 'Footer slot' } }] diff --git a/test/components/Kbd.spec.ts b/test/components/Kbd.spec.ts index c4e877fe..6487db9d 100644 --- a/test/components/Kbd.spec.ts +++ b/test/components/Kbd.spec.ts @@ -5,6 +5,7 @@ import ComponentRender from '../component-render' describe('Kbd', () => { it.each([ ['with value', { props: { value: 'K' } }], + ['with as', { props: { value: 'K', as: 'span' } }], ['with class', { props: { value: 'K', class: 'font-bold' } }], ['with size xs', { props: { value: 'K', size: 'xs' as const } }], ['with size sm', { props: { value: 'K', size: 'sm' as const } }], diff --git a/test/components/Skeleton.spec.ts b/test/components/Skeleton.spec.ts index 91adcf45..4e8d3ce4 100644 --- a/test/components/Skeleton.spec.ts +++ b/test/components/Skeleton.spec.ts @@ -5,6 +5,7 @@ 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) diff --git a/test/components/__snapshots__/Badge.spec.ts.snap b/test/components/__snapshots__/Badge.spec.ts.snap index 9b752dce..e51ed7ea 100644 --- a/test/components/__snapshots__/Badge.spec.ts.snap +++ b/test/components/__snapshots__/Badge.spec.ts.snap @@ -1,5 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +exports[`Badge > renders with as correctly 1`] = `"