diff --git a/src/stores/modelToNodeStore.test.ts b/src/stores/modelToNodeStore.test.ts index c79af19b5..a833920db 100644 --- a/src/stores/modelToNodeStore.test.ts +++ b/src/stores/modelToNodeStore.test.ts @@ -189,7 +189,7 @@ describe('useModelToNodeStore', () => { it('should not register provider when nodeDef is undefined', () => { const modelToNodeStore = useModelToNodeStore() const providerWithoutNodeDef = new ModelNodeProvider( - undefined as any, + undefined as unknown as ComfyNodeDefImpl, 'custom_key' ) @@ -458,13 +458,13 @@ describe('useModelToNodeStore', () => { // These should not throw but return undefined expect( - modelToNodeStore.getCategoryForNodeType(null as any) + modelToNodeStore.getCategoryForNodeType(null as unknown as string) ).toBeUndefined() expect( - modelToNodeStore.getCategoryForNodeType(undefined as any) + modelToNodeStore.getCategoryForNodeType(undefined as unknown as string) ).toBeUndefined() expect( - modelToNodeStore.getCategoryForNodeType(123 as any) + modelToNodeStore.getCategoryForNodeType(123 as unknown as string) ).toBeUndefined() }) diff --git a/src/stores/subgraphStore.test.ts b/src/stores/subgraphStore.test.ts index 68f528ae4..3edafd5ca 100644 --- a/src/stores/subgraphStore.test.ts +++ b/src/stores/subgraphStore.test.ts @@ -1,6 +1,7 @@ import { createPinia, setActivePinia } from 'pinia' import { beforeEach, describe, expect, it, vi } from 'vitest' +import type { ExportedSubgraph } from '@/lib/litegraph/src/litegraph' import type { ComfyNodeDef as ComfyNodeDefV1 } from '@/schemas/nodeDefSchema' import { api } from '@/scripts/api' import { app as comfyApp } from '@/scripts/app' @@ -72,7 +73,7 @@ describe('useSubgraphStore', () => { ({ status: 200, text: () => JSON.stringify(filenames[f.slice(10)]) - }) as any + }) as unknown as ReturnType ) return await store.fetchSubgraphs() } @@ -92,7 +93,7 @@ describe('useSubgraphStore', () => { vi.mocked(comfyApp.canvas).selectedItems = new Set([subgraphNode]) vi.mocked(comfyApp.canvas)._serializeItems = vi.fn(() => ({ nodes: [subgraphNode.serialize()], - subgraphs: [subgraph.serialize() as any] + subgraphs: [subgraph.serialize() as unknown as ExportedSubgraph] })) //mock saving of file vi.mocked(api.storeUserData).mockResolvedValue({