mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 00:15:32 +00:00
change(web): address many PR review concerns
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
This commit is contained in:
parent
44fdb6ed47
commit
79fd689d13
5 changed files with 34 additions and 5 deletions
|
|
@ -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]))));
|
||||
});
|
||||
});
|
||||
|
|
@ -69,16 +69,16 @@ export const buildAlphabeticClusterFixtures = () => {
|
|||
]; // 0.60 total
|
||||
|
||||
const distrib_v2_i1d1: Distribution<Transform> = [
|
||||
{ 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<Transform> = [
|
||||
{ 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 },
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue