mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(FileUpload): new component
Co-Authored-By: Vachmara <55046446+vachmara@users.noreply.github.com>
This commit is contained in:
18
test/components/FileUpload.spec.ts
Normal file
18
test/components/FileUpload.spec.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import FileUpload from '../../src/runtime/components/FileUpload.vue'
|
||||
import type { FileUploadProps, FileUploadSlots } from '../../src/runtime/components/FileUpload.vue'
|
||||
import ComponentRender from '../component-render'
|
||||
|
||||
describe('FileUpload', () => {
|
||||
it.each([
|
||||
// Props
|
||||
['with as', { props: { as: 'section' } }],
|
||||
['with class', { props: { class: '' } }],
|
||||
['with ui', { props: { ui: {} } }],
|
||||
// Slots
|
||||
['with default slot', { slots: { default: () => 'Default slot' } }]
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: { props?: FileUploadProps, slots?: Partial<FileUploadSlots> }) => {
|
||||
const html = await ComponentRender(nameOrHtml, options, FileUpload)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user