mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-05 05:00:03 +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:
13
test/LGraph_constructor.test.ts
Normal file
13
test/LGraph_constructor.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { describe } from "vitest"
|
||||
import { LGraph } from "@/litegraph"
|
||||
import { dirtyTest } from "./testExtensions"
|
||||
|
||||
describe("LGraph (constructor only)", () => {
|
||||
dirtyTest("Matches previous snapshot", ({ expect, minimalSerialisableGraph, basicSerialisableGraph }) => {
|
||||
const minLGraph = new LGraph(minimalSerialisableGraph)
|
||||
expect(minLGraph).toMatchSnapshot("minLGraph")
|
||||
|
||||
const basicLGraph = new LGraph(basicSerialisableGraph)
|
||||
expect(basicLGraph).toMatchSnapshot("basicLGraph")
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user