merge-errors.json 1.1 KB

123456789101112131415161718192021
  1. {
  2. "name": "verify-merge-errors",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "a", "name": "BranchA", "type": "code", "position": {"x": -100, "y": 100},
  6. "config": {"code": "return [{name: 'no-id-one'}, {name: 'no-id-two'}];"}},
  7. {"id": "b", "name": "BranchB", "type": "code", "position": {"x": 100, "y": 100},
  8. "config": {"code": "return [{id: 1, name: 'one'}];"}},
  9. {"id": "m", "name": "Merge", "type": "merge", "position": {"x": 0, "y": 220},
  10. "config": {"mode": "combine-by-key", "key": "id", "path1": "result", "path2": "result"}}
  11. ],
  12. "connections": [
  13. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "a", "targetInput": "data"},
  14. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "b", "targetInput": "data"},
  15. {"sourceNodeId": "a", "sourceOutput": "main", "targetNodeId": "m", "targetInput": "input1"},
  16. {"sourceNodeId": "b", "sourceOutput": "main", "targetNodeId": "m", "targetInput": "input2"}
  17. ],
  18. "expect": {
  19. "m": {"status": "failed", "errorContains": "an item in input1 has no \"id\" to combine on"}
  20. }
  21. }