From 6d991eeeccfacec28eb4e29a6b5be94345ba37a2 Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Thu, 28 Aug 2025 22:46:58 +0700 Subject: [PATCH] fix(web): Apply unit-test suggestions from code review Co-authored-by: Eberhard Beilharz --- .../correction-search/distance-modeler.tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts index f56b00881f..417265c56d 100644 --- a/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/distance-modeler.tests.ts @@ -205,8 +205,8 @@ describe('Correction Distance Modeler', function() { const secondLayerNodes = tNode .buildSubstitutionEdges(secondLayerTransforms) .flatMap(node => node.processSubsetEdge()); - assert.isAbove(firstLayerNodes.length, FIRST_CHAR_VARIANTS); - firstLayerNodes.sort((a, b) => a.currentCost - b.currentCost); + assert.isAbove(secondLayerNodes.length, 10); + secondLayerNodes.sort((a, b) => a.currentCost - b.currentCost); const teNode = secondLayerNodes[0]; @@ -288,8 +288,8 @@ describe('Correction Distance Modeler', function() { const secondLayerNodes = tNode .buildSubstitutionEdges(secondLayerTransforms) .flatMap(node => node.processSubsetEdge()); - assert.isAbove(firstLayerNodes.length, FIRST_CHAR_VARIANTS); - firstLayerNodes.sort((a, b) => a.currentCost - b.currentCost); + assert.isAbove(secondLayerNodes.length, 10); + secondLayerNodes.sort((a, b) => a.currentCost - b.currentCost); const teNode = secondLayerNodes[0];