aggregate-errors-key.json 859 B

1234567891011121314151617
  1. {
  2. "name": "verify-aggregate-errors-key",
  3. "nodes": [
  4. {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
  5. {"id": "n2", "name": "Fixture", "type": "code", "position": {"x": 0, "y": 100},
  6. "config": {"code": "return { items: [{sku: 'a', tier: 'x'}, {sku: 'b', tier: 'y'}] };"}},
  7. {"id": "n3", "name": "AggregateReservedKey", "type": "aggregate", "position": {"x": 0, "y": 200},
  8. "config": {"inputField": "data.result.items", "outputField": "key", "groupBy": "tier"}}
  9. ],
  10. "connections": [
  11. {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
  12. {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"}
  13. ],
  14. "expect": {
  15. "n3": {"status": "failed", "errorContains": "outputField cannot be \"key\""}
  16. }
  17. }