fix(web): Apply unit-test suggestions from code review

Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
This commit is contained in:
Joshua Horton 2025-08-28 22:46:58 +07:00 committed by GitHub
parent 26c787d24d
commit 6d991eeecc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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];