Fix test cases

Turns out the vuedraggable import has side effects that break other
test cases. This is awful and requires further investigation, but for
now, the import is performed at execution time
This commit is contained in:
Austin Mroz
2025-09-27 15:34:39 -05:00
parent 44d57ce041
commit e91bbf030b
4 changed files with 23 additions and 13 deletions

View File

@@ -1,15 +1,21 @@
import { describe, expect, test, vi } from 'vitest'
import '@/core/graph/subgraph/proxyWidget'
//import { ComponentWidgetImpl, DOMWidgetImpl } from '@/scripts/domWidget'
import { LGraphNode, type SubgraphNode } from '@/lib/litegraph/src/litegraph'
import { registerProxyWidgets } from '@/core/graph/subgraph/proxyWidget'
import {
type LGraphCanvas,
LGraphNode,
type SubgraphNode
} from '@/lib/litegraph/src/litegraph'
import {
createTestSubgraph,
createTestSubgraphNode
} from '../litegraph/subgraph/fixtures/subgraphHelpers'
registerProxyWidgets({
canvas: { addEventListener() {} }
} as unknown as LGraphCanvas)
vi.mock('@/renderer/core/canvas/canvasStore', () => ({
useCanvasStore: () => ({})
}))