Files
nuxt__ui/test/components/content/ContentSearchButton.spec.ts
Benjamin Canac f6ae153428 feat: import @nuxt/ui-pro components (#4675)
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
2025-08-14 21:28:57 +02:00

19 lines
882 B
TypeScript

import { describe, it, expect } from 'vitest'
import ContentSearchButton from '../../../src/runtime/components/content/ContentSearchButton.vue'
import type { ContentSearchButtonProps } from '../../../src/runtime/components/content/ContentSearchButton.vue'
import ComponentRender from '../../component-render'
describe('DashboardSearchButton', () => {
it.each([
// Props
['with label', { props: { label: 'Open' } }],
['with icon', { props: { icon: 'i-lucide-house' } }],
['with kbds', { props: { kbds: ['alt', 'o'] } }],
['without collapsed', { props: { collapsed: false } }],
['with class', { props: { class: 'w-full' } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: ContentSearchButtonProps }) => {
const html = await ComponentRender(nameOrHtml, options, ContentSearchButton)
expect(html).toMatchSnapshot()
})
})