diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusterFixture.tests.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusterFixture.tests.ts index 9a595df441..b680159c04 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusterFixture.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusterFixture.tests.ts @@ -1,3 +1,12 @@ +/* + * Keyman is copyright (C) SIL Global. MIT License. + * + * Created by jahorton on 2026-03-09 + * + * This file tests the construction of the helper test-fixture function in + * buildAlphabeticClusteredFixture.ts. + */ + import { assert } from "chai"; import { SearchQuotientNode } from "@keymanapp/lm-worker/test-index"; @@ -15,7 +24,7 @@ describe('buildAlphabeticClusteredFixture() fixture', () => { const allDists = Object.values(distributions).map(set => Object.values(set)).flat(); const finalClusterPaths = constituentPaths(clusters.cluster_k5c6) as SearchQuotientNode[][]; - allPaths.forEach((spur) => assert.isTrue(finalClusterPaths.find(seq => seq.indexOf(spur) > -1))); - allDists.forEach((dist) => allPaths.find(path => quotientPathHasInputs(path, [dist]))); + allPaths.forEach((spur) => assert.isOk(finalClusterPaths.find(seq => seq.indexOf(spur) > -1))); + allDists.forEach((dist) => assert.isOk(allPaths.find(path => quotientPathHasInputs(path, [dist])))); }); }); \ No newline at end of file diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusteredFixture.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusteredFixture.ts index a6493368d7..5da1bb59dd 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusteredFixture.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/buildAlphabeticClusteredFixture.ts @@ -69,16 +69,16 @@ export const buildAlphabeticClusterFixtures = () => { ]; // 0.60 total const distrib_v2_i1d1: Distribution = [ - { sample: { insert: 'á', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.05 }, { sample: { insert: 'é', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.06 }, + { sample: { insert: 'á', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.05 }, { sample: { insert: 'í', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.04 }, { sample: { insert: 'ó', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.03 }, { sample: { insert: 'ú', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.02 }, ]; // 0.2 total const distrib_v2_i2d1: Distribution = [ - { sample: { insert: 'áá', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.05 }, { sample: { insert: 'éé', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.06 }, + { sample: { insert: 'áá', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.05 }, { sample: { insert: 'íí', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.04 }, { sample: { insert: 'óó', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.03 }, { sample: { insert: 'úú', deleteLeft: 1, deleteRight: 0, id: 13 }, p: 0.02 }, diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.tests.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.tests.ts index 41acda3825..de3620a202 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.tests.ts @@ -1,3 +1,13 @@ +/* + * Keyman is copyright (C) SIL Global. MIT License. + * + * Created by jahorton on 2026-03-09 + * + * This file defines unit tests for validating a unit-text fixture for behaviors + * related to a simple linear sequence of SearchQuotientSpurs, with no + * convergence or divergence occurring within the fixture. + */ + import { assert } from "chai"; import { constituentPaths } from "./constituentPaths.js"; diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.ts index c7c9d68bcc..9226ff9582 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/buildCantLinearFixture.ts @@ -1,3 +1,13 @@ +/* + * Keyman is copyright (C) SIL Global. MIT License. + * + * Created by jahorton on 2026-03-09 + * + * This file defines a unit-text fixture for testing behaviors related to a + * simple linear sequence of SearchQuotientSpurs, with no convergence or + * divergence occurring within the fixture. + */ + import { LegacyQuotientRoot, LegacyQuotientSpur, models } from "@keymanapp/lm-worker/test-index"; import { jsonFixture } from "@keymanapp/common-test-resources/model-helpers.mjs"; diff --git a/web/src/test/auto/headless/engine/predictive-text/helpers/quotientPathHasInputs.tests.ts b/web/src/test/auto/headless/engine/predictive-text/helpers/quotientPathHasInputs.tests.ts index 952699ef16..b0f4ee34d2 100644 --- a/web/src/test/auto/headless/engine/predictive-text/helpers/quotientPathHasInputs.tests.ts +++ b/web/src/test/auto/headless/engine/predictive-text/helpers/quotientPathHasInputs.tests.ts @@ -10,11 +10,11 @@ import { assert } from 'chai'; import { models, SearchQuotientRoot } from '@keymanapp/lm-worker/test-index'; +import { jsonFixture } from "@keymanapp/common-test-resources/model-helpers.mjs"; import { quotientPathHasInputs } from "./quotientPathHasInputs.js"; import { buildCantLinearFixture } from './buildCantLinearFixture.js'; import { buildAlphabeticClusterFixtures } from './buildAlphabeticClusteredFixture.js'; -import { jsonFixture } from '../templates/helpers.js'; import TrieModel = models.TrieModel;