mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
test: remove any type from UserAvatar test mountComponent helper
- Replace `props: any` with `Record<string, unknown>` - Use ComponentProps type assertion for type safety - Import ComponentProps from vue-component-type-helpers Part of Phase 2 - Quick wins (1 instance removed)
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import type { ComponentProps } from 'vue-component-type-helpers'
|
||||||
|
|
||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Avatar from 'primevue/avatar'
|
import Avatar from 'primevue/avatar'
|
||||||
import PrimeVue from 'primevue/config'
|
import PrimeVue from 'primevue/config'
|
||||||
@@ -27,7 +29,7 @@ describe('UserAvatar', () => {
|
|||||||
app.use(PrimeVue)
|
app.use(PrimeVue)
|
||||||
})
|
})
|
||||||
|
|
||||||
const mountComponent = (props: any = {}) => {
|
const mountComponent = (props: ComponentProps<typeof UserAvatar> = {}) => {
|
||||||
return mount(UserAvatar, {
|
return mount(UserAvatar, {
|
||||||
global: {
|
global: {
|
||||||
plugins: [PrimeVue, i18n],
|
plugins: [PrimeVue, i18n],
|
||||||
|
|||||||
Reference in New Issue
Block a user