mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 11:40:00 +00:00
[Bug] Fix remove of floatingLinks (#792)
Resolves https://github.com/Comfy-Org/litegraph.js/issues/791 This PR fixes removal of floating links. --------- Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
This commit is contained in:
@@ -5,12 +5,14 @@ import { test as baseTest } from "vitest"
|
||||
import { LGraph } from "@/LGraph"
|
||||
import { LiteGraph } from "@/litegraph"
|
||||
|
||||
import floatingLink from "./assets/floatingLink.json"
|
||||
import { basicSerialisableGraph, minimalSerialisableGraph, oldSchemaGraph } from "./assets/testGraphs"
|
||||
|
||||
interface LitegraphFixtures {
|
||||
minimalGraph: LGraph
|
||||
minimalSerialisableGraph: SerialisableGraph
|
||||
oldSchemaGraph: ISerialisedGraph
|
||||
floatingLinkGraph: ISerialisedGraph
|
||||
}
|
||||
|
||||
/** These fixtures alter global state, and are difficult to reset. Relies on a single test per-file to reset state. */
|
||||
@@ -29,6 +31,7 @@ export const test = baseTest.extend<LitegraphFixtures>({
|
||||
},
|
||||
minimalSerialisableGraph: structuredClone(minimalSerialisableGraph),
|
||||
oldSchemaGraph: structuredClone(oldSchemaGraph),
|
||||
floatingLinkGraph: structuredClone(floatingLink as unknown as ISerialisedGraph),
|
||||
})
|
||||
|
||||
/** Test that use {@link DirtyFixtures}. One test per file. */
|
||||
|
||||
Reference in New Issue
Block a user