mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
5cb65cfbd0
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
19 lines
826 B
TypeScript
19 lines
826 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import ChatPromptSubmit from '../../src/runtime/components/ChatPromptSubmit.vue'
|
|
import type { ChatPromptSubmitProps } from '../../src/runtime/components/ChatPromptSubmit.vue'
|
|
import ComponentRender from '../component-render'
|
|
|
|
describe('ChatPromptSubmit', () => {
|
|
const statuses = ['ready', 'submitted', 'streaming', 'error'] as any
|
|
|
|
it.each([
|
|
// Props
|
|
['with icon', { props: { icon: 'i-lucide-send' } }],
|
|
...statuses.map((status: string) => [`with status ${status}`, { props: { status } }]),
|
|
['with class', { props: { class: '' } }]
|
|
])('renders %s correctly', async (nameOrHtml: string, options: { props?: ChatPromptSubmitProps }) => {
|
|
const html = await ComponentRender(nameOrHtml, options, ChatPromptSubmit)
|
|
expect(html).toMatchSnapshot()
|
|
})
|
|
})
|