mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 03:01:54 +00:00
test: remove any type from ApiKeyForm test mountComponent helper
- Replace `props: any` with ComponentProps<typeof ApiKeyForm> - Import ComponentProps from vue-component-type-helpers - Linter optimized to direct ComponentProps usage 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 { Form } from '@primevue/forms'
|
import { Form } from '@primevue/forms'
|
||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
@@ -63,7 +65,7 @@ describe('ApiKeyForm', () => {
|
|||||||
mockLoading.mockReset()
|
mockLoading.mockReset()
|
||||||
})
|
})
|
||||||
|
|
||||||
const mountComponent = (props: any = {}) => {
|
const mountComponent = (props: ComponentProps<typeof ApiKeyForm> = {}) => {
|
||||||
return mount(ApiKeyForm, {
|
return mount(ApiKeyForm, {
|
||||||
global: {
|
global: {
|
||||||
plugins: [PrimeVue, createPinia(), i18n],
|
plugins: [PrimeVue, createPinia(), i18n],
|
||||||
|
|||||||
Reference in New Issue
Block a user