mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-01 19:20:10 +00:00
test: remove explicit any type from useLoad3dDrag.test.ts
Replaced any with ReturnType<typeof useToastStore> for mockToastStore. All tests passing (13/13), 0 typecheck errors. Part of #8092
This commit is contained in:
@@ -34,7 +34,7 @@ function createMockDragEvent(
|
||||
}
|
||||
|
||||
describe('useLoad3dDrag', () => {
|
||||
let mockToastStore: any
|
||||
let mockToastStore: ReturnType<typeof useToastStore>
|
||||
let mockOnModelDrop: (file: File) => void | Promise<void>
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -42,7 +42,9 @@ describe('useLoad3dDrag', () => {
|
||||
|
||||
mockToastStore = {
|
||||
addAlert: vi.fn()
|
||||
}
|
||||
} as Partial<ReturnType<typeof useToastStore>> as ReturnType<
|
||||
typeof useToastStore
|
||||
>
|
||||
vi.mocked(useToastStore).mockReturnValue(mockToastStore)
|
||||
|
||||
mockOnModelDrop = vi.fn()
|
||||
|
||||
Reference in New Issue
Block a user