| 8 | // A minimal, schema-valid workflow: all six required top-level fields, one node |
| 9 | // with a correct `type` discriminator. Tests tweak a copy to drive each case. |
| 10 | function validWorkflow() { |
| 11 | return { |
| 12 | schemaVersion: 1, |
| 13 | nodes: [ |
| 14 | { |
| 15 | id: "t1", |
| 16 | type: "Ticker", |
| 17 | position: { x: 0, y: 0 }, |
| 18 | arguments: { intervalValue: 15, intervalUnit: "seconds" }, |
| 19 | }, |
| 20 | ], |
| 21 | edges: [], |
| 22 | functions: [], |
| 23 | declaredVariables: [], |
| 24 | channels: [], |
| 25 | memory: [], |
| 26 | models: [], |
| 27 | }; |
| 28 | } |
| 29 | |
| 30 | describe("validateAgainstContract", () => { |
| 31 | it("accepts a schema-valid workflow", () => { |