| 12345678910111213141516171819202122232425262728 |
- {
- "name": "verify-merge",
- "nodes": [
- {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
- {"id": "a", "name": "BranchA", "type": "code", "position": {"x": -100, "y": 100},
- "config": {"code": "return [{id: 1, name: 'one'}, {id: 2, name: 'two'}];"}},
- {"id": "b", "name": "BranchB", "type": "code", "position": {"x": 100, "y": 100},
- "config": {"code": "return [{id: 2, extra: 'from-b'}, {id: 3, name: 'three'}];"}},
- {"id": "m", "name": "Merge", "type": "merge", "position": {"x": 0, "y": 220},
- "config": {"mode": "combine-by-key", "key": "id", "path1": "result", "path2": "result"}}
- ],
- "connections": [
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "a", "targetInput": "data"},
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "b", "targetInput": "data"},
- {"sourceNodeId": "a", "sourceOutput": "main", "targetNodeId": "m", "targetInput": "input1"},
- {"sourceNodeId": "b", "sourceOutput": "main", "targetNodeId": "m", "targetInput": "input2"}
- ],
- "expect": {
- "m": {"status": "completed", "output": {
- "count": 3,
- "merged": [
- {"id": 1, "name": "one"},
- {"id": 2, "name": "two", "extra": "from-b"},
- {"id": 3, "name": "three"}
- ]
- }}
- }
- }
|