From 30f2f363b3d06a59364fd85c565b1bc75a169f2f Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Fri, 15 May 2026 01:47:47 +0700 Subject: [PATCH] change(web): Apply EB suggestions from code review Co-authored-by: Eberhard Beilharz --- .../engine/predictive-text/helpers/constituentPaths.tests.ts | 2 +- .../engine/predictive-text/helpers/constituentPaths.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.tests.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.tests.ts index 30cac6a53a..d3df0742d5 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.tests.ts @@ -89,7 +89,7 @@ describe('constituentPaths', () => { return type == 'insert' && typeSeq[index+1] == 'delete'; }); }); - assert.isNotOk(shouldOccur); + assert.isOk(shouldOccur); }); }); }); \ No newline at end of file diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.ts index 80f047989b..3832507871 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/constituentPaths.ts @@ -28,7 +28,8 @@ export function constituentPaths(node: SearchQuotientNode): SearchQuotientSpur[] } else if(node instanceof SearchQuotientCluster) { return node.parents.flatMap((p) => constituentPaths(p)); } else if(node instanceof SearchQuotientSpur) { - const parentPaths = constituentPaths(node.parents[0]); let pathsToExtend = parentPaths; + const parentPaths = constituentPaths(node.parents[0]); + let pathsToExtend = parentPaths; if(node instanceof InsertionQuotientSpur) { pathsToExtend = pathsToExtend.filter(s => { @@ -36,7 +37,7 @@ export function constituentPaths(node: SearchQuotientNode): SearchQuotientSpur[] // Deletion nodes and modules should always be ordered after those for // insertion in order to avoid duplicating search paths. (Insertions may - // stick to the right of a root, while deletions always process inputs; they + // stick to the right of a root, while deletions always process inputs; insertions // may thus precede deletions.) // // Also, internally, insertion edges are not built after deletion (or empty) edges.