mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 10:20:42 +01:00
fix(RadioGroup): rendering empty slots (#2456)
This commit is contained in:
15
test/components/elements/RadioGroup.spec.ts
Normal file
15
test/components/elements/RadioGroup.spec.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import type { TypeOf } from 'zod'
|
||||
import ComponentRender from '../component-render'
|
||||
import { URadioGroup } from '#components'
|
||||
|
||||
describe('RadioGroup', () => {
|
||||
it.each([
|
||||
['basic case', { props: { options: [{ value: 'value', label: 'label' }] } }],
|
||||
['help text', { props: { options: [{ value: 'value', label: 'label', help: 'i need somebody' }] } }]
|
||||
// @ts-ignore
|
||||
])('renders %s correctly', async (nameOrHtml: string, options: TypeOf<typeof URadioGroup.props>) => {
|
||||
const html = await ComponentRender(nameOrHtml, options, URadioGroup)
|
||||
expect(html).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user