mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 23:20:07 +00:00
test: remove explicit any type from FormRadioGroup.test.ts
Replaced any with Record<string, unknown> for mountComponent props parameter. Uses as unknown as cast to allow testing edge cases with invalid prop types. All tests passing (11/11), 0 typecheck errors. Part of #8092
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type { ComponentProps } from 'vue-component-type-helpers'
|
||||
|
||||
import { mount } from '@vue/test-utils'
|
||||
import PrimeVue from 'primevue/config'
|
||||
import RadioButton from 'primevue/radiobutton'
|
||||
@@ -14,13 +16,13 @@ describe('FormRadioGroup', () => {
|
||||
app.use(PrimeVue)
|
||||
})
|
||||
|
||||
const mountComponent = (props: any, options = {}) => {
|
||||
const mountComponent = (props: Record<string, unknown>, options = {}) => {
|
||||
return mount(FormRadioGroup, {
|
||||
global: {
|
||||
plugins: [PrimeVue],
|
||||
components: { RadioButton }
|
||||
},
|
||||
props,
|
||||
props: props as unknown as ComponentProps<typeof FormRadioGroup>,
|
||||
...options
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user