import { test, expect } from 'vitest'; import parse from '../parse'; import { TestData } from '../type'; const data: TestData = { "input": { "edges": [ { sourceNodeId: "1", targetNodeId: "2" }, { sourceNodeId: "1", targetNodeId: "3" }, ], "nodes": [ { id: "1", type: "SWITCH", properties: { nodeId: "1" } }, { id: "2", type: "ID", properties: { nodeId: "2" } }, { id: "3", type: "ID", properties: { nodeId: "3" } } ] }, "output": "SWITCH(1).to(2,3)" } test("empty", () => { expect(parse(data.input)).toBe(data.output); })