Explorar el Código

fix: strengthen sort-limit-dedupe fixture to pin dedupe-before-sort

Old data had the first-occurring duplicate also be the higher-scoring
one, so sort-before-dedupe produced the same final answer. New data
makes the first-occurring 'a' the lower-scoring one, so only the
correct dedupe-then-sort-then-limit order yields [b, c].
fszontagh hace 1 mes
padre
commit
23785f43d6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      tests/nodes/sort-limit-dedupe.json

+ 1 - 1
tests/nodes/sort-limit-dedupe.json

@@ -3,7 +3,7 @@
   "nodes": [
     {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
     {"id": "n2", "name": "Fixture", "type": "code", "position": {"x": 0, "y": 100},
-     "config": {"code": "return { rows: [{id: 'a', score: 3}, {id: 'b', score: 9}, {id: 'a', score: 1}, {id: 'c', score: 5}] };"}},
+     "config": {"code": "return { rows: [{id: 'a', score: 1}, {id: 'b', score: 9}, {id: 'a', score: 7}, {id: 'c', score: 5}] };"}},
     {"id": "n3", "name": "Shape", "type": "sort-limit-dedupe", "position": {"x": 0, "y": 200},
      "config": {
        "inputField": "data.result.rows",