mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 22:50:27 +00:00
[Test] Add integration test: LGraph snapshot (#591)
- Runs basic Litegraph init before performing the snapshot - Allows a significantly more useful verification of the public API
This commit is contained in:
15
test/ConfigureGraph.test.ts
Normal file
15
test/ConfigureGraph.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { describe } from "vitest"
|
||||
import { LGraph } from "@/litegraph"
|
||||
import { dirtyTest } from "./testExtensions"
|
||||
|
||||
describe("LGraph configure()", () => {
|
||||
dirtyTest("LGraph matches previous snapshot (normal configure() usage)", ({ expect, minimalSerialisableGraph, basicSerialisableGraph }) => {
|
||||
const configuredMinGraph = new LGraph()
|
||||
configuredMinGraph.configure(minimalSerialisableGraph)
|
||||
expect(configuredMinGraph).toMatchSnapshot("configuredMinGraph")
|
||||
|
||||
const configuredBasicGraph = new LGraph()
|
||||
configuredBasicGraph.configure(basicSerialisableGraph)
|
||||
expect(configuredBasicGraph).toMatchSnapshot("configuredBasicGraph")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user