MCPcopy Index your code
hub / github.com/simstudioai/sim / createMockNode

Function createMockNode

apps/sim/executor/execution/edge-manager.test.ts:20–37  ·  view source on GitHub ↗
(
  id: string,
  outgoingEdges: DAGEdge[] = [],
  incomingEdges: string[] = []
)

Source from the content-addressed store, hash-verified

18}
19
20function createMockNode(
21 id: string,
22 outgoingEdges: DAGEdge[] = [],
23 incomingEdges: string[] = []
24): DAGNode {
25 const outEdgesMap = new Map<string, DAGEdge>()
26 outgoingEdges.forEach((edge, i) => {
27 outEdgesMap.set(`edge-${i}`, edge)
28 })
29
30 return {
31 id,
32 block: createMockBlock(id),
33 outgoingEdges: outEdgesMap,
34 incomingEdges: new Set(incomingEdges),
35 metadata: {},
36 }
37}
38
39function createMockDAG(nodes: Map<string, DAGNode>): DAG {
40 return {

Callers 2

setupWorkflowFunction · 0.70

Calls 2

createMockBlockFunction · 0.70
setMethod · 0.65

Tested by

no test coverage detected