Merge pull request #16857 from keymanapp/chore/web/keymanheader

chore(web): add Keyman header to test files
This commit is contained in:
Eberhard Beilharz 2026-10-21 08:45:13 +02:00 • committed by GitHub
commit 686a8feadf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
100 changed files with 347 additions and 58 deletions

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { LexicalModelTypes } from '@keymanapp/common-types';
/**

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import fs from 'fs';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LMLayer, WebWorker } from "@keymanapp/lexical-model-layer/web";

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LMLayer, WebWorker } from "@keymanapp/lexical-model-layer/web";

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LMLayer, WebWorker } from "@keymanapp/lexical-model-layer/web";

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
export let defaultCapabilities = {
maxLeftContextCodeUnits: 64
};
};

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { timedPromise } from "keyman/common/web-utils";
const MIN_OUTLIER = 1; // 1ms.

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LMLayerWorkerCode } from "@keymanapp/lm-worker/worker-main.wrapped.js";
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { PageContextAttachment } from 'keyman/engine/attachment';
import { DeviceSpec, timedPromise } from 'keyman/common/web-utils';
import { DEFAULT_BROWSER_TIMEOUT } from '@keymanapp/common-test-resources/test-timeouts.mjs';
@ -867,4 +870,4 @@ describe('KMW element-attachment logic', function () {
attacher.shutdown();
});
})
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { ContextManager } from 'keyman/app/browser';
import { textStoreForElement } from 'keyman/engine/attachment';
import { TextAreaElementTextStore } from 'keyman/engine/element-text-stores';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { CookieSerializer } from 'keyman/engine/dom-utils';
import { assert } from 'chai';
@ -137,4 +140,4 @@ describe('CookieSerializer', function () {
assert.sameDeepMembers(result, []);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { KMWString } from 'keyman/common/web-utils';
@ -1412,4 +1415,4 @@ describe('Element InputElementTextStore/Output Interfacing', function () {
});
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { KMWString } from 'keyman/common/web-utils';
@ -148,4 +151,4 @@ describe('SyntheticTextStore', function() {
});
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -126,4 +129,4 @@ describe("'Canary' checks", function() {
assert.isTrue(fakeHandler.called, "Unit test attempt failed: handler was not called successfully.");
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -96,4 +99,4 @@ describe("Layer one - DOM -> InputSequence", function() {
assert.equal(recorder.count, 0, "Input starting outside the main receiver element's hierarchy was not ignored!");
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert, expect } from 'chai';
import sinon from 'sinon';
@ -156,4 +159,4 @@ describe("Layer one - DOM -> InputSequence", function() {
});
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -171,4 +174,4 @@ describe("Cloud-query interface", () => {
assert.isTrue(stubs[0].KF.includes('s.keyman.com')); // The keyboardsURI property from the cloud options should be applied.
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -96,4 +99,4 @@ describe("Mocked cloud query results ('canary' testing)", () => {
assert.isOk(keyboard.languages.find((language: any) => language.id == 'dz'));
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -108,4 +111,4 @@ describe("KeyboardRequisitioner", function () {
assert.strictEqual(cache.getKeyboardForStub(stub), khmer_angkor);
assert.isOk(khmer_angkor);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { DOMKeyboardLoader } from 'keyman/engine/keyboard';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import * as KeymanOSK from 'keyman/engine/osk';
import { DeviceDetector } from 'keyman/engine/main';
@ -131,4 +134,4 @@ describe('OSK activation', function () {
assert.equal(container.offsetWidth, 600);
assert.equal(container.offsetHeight, 400);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import * as KeymanOSK from 'keyman/engine/osk';
import { DeviceDetector } from 'keyman/engine/main';
@ -82,4 +85,4 @@ describe('OSK events', function () {
osk.activationModel.enabled = true;
assert.isTrue(legacyShowStub.calledOnce);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
// A simple "does device detection work properly" unit test.
// We'll let things break after this reports, since this will likely signal a LOT of other failures.
import { assert } from 'chai';
@ -26,4 +29,4 @@ describe('Test Initialization', function() {
assert.fail(err);
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import {
DOMKeyboardLoader,
JSKeyboard,
@ -59,4 +62,4 @@ export function loadKeyboardsFromStubs(apiStubs: any, baseDir: string) {
}
return priorPromise.then(() => keyboards);
}
}

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
// Defines an object for dynamically adding elements for testing purposes.
// Designed for use with the robustAttachment.html fixture.

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { unitTestEndPoints } from 'keyman/app/browser';
@ -593,4 +596,4 @@ describe("app/browser: hardware event processing", () => {
});
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
// @ts-ignore // Type info unavailable; doing a npm-install for it breaks things much worse in other ways.
import { JSDOM } from 'jsdom';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -47,4 +50,4 @@ describe("EmitterListenerSpy", () => {
assert.isTrue(fakeRemoveListener.calledOnce);
assert.equal(fakeRemoveListener.firstCall.args[0], 'event');
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -29,4 +32,4 @@ describe("LegacyEventEmitter", () => {
* - Adherence to the callEvent return-type spec
* - Listener returns false => no further listeners get called.
*/
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { PathOptionDefaults, PathConfiguration } from 'keyman/engine/interfaces';
@ -67,4 +70,4 @@ describe("Path Configuration", () => {
assert.equal(paths.keyboards, '');
assert.equal(paths.fonts, '');
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from "chai";
import { DEFAULT_PROCESSOR_INIT_OPTIONS } from 'keyman/test/resources';
import { JSKeyboardProcessor } from "keyman/engine/js-processor";

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';
@ -1233,4 +1236,4 @@ describe('Engine - Context Matching', function() {
runEngineRuleSet([NOTANY_NUL_TEST_3]);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';
@ -103,4 +106,4 @@ describe('Engine - notany() and context()', function() {
it('verify notany comparison flip correction from #3817', function() {
runStringRuleSet('YZ', 'pass!');
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { KMWString } from 'keyman/common/web-utils';
@ -49,4 +52,4 @@ describe('Engine - Stores', function() {
});
// TODO: Migrate a Node-based copy of the variable store tests here as well.
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { ModifierKeyConstants } from '@keymanapp/common-types';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { SyntheticTextStore, findCommonSubstringEndIndex } from 'keyman/engine/keyboard';
@ -509,4 +512,4 @@ but not himself.`; // Sheev Palpatine, in the Star Wars prequels.
});
});
*/
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
import fs from 'fs';
@ -172,4 +175,4 @@ describe('StubAndKeyboardCache', function () {
assert.isTrue(err.message.includes('bad_stub'));
};
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import fs from 'fs';
import path from 'path';
@ -95,4 +98,4 @@ describe('Keyboard Properties', function() {
propObject.displayName = customDisplayName;
assert.equal(propObject.displayName, customDisplayName);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { createRequire } from 'module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { SyntheticTextStore } from 'keyman/engine/keyboard';
@ -89,4 +92,4 @@ describe('SyntheticTextStoreTests', function() {
assert.deepEqual(postClear, editTextStore);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { env } from 'node:process';
import fs from 'node:fs';
import { createRequire } from 'node:module';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -230,4 +233,4 @@ describe("Activators", () => {
assert.deepStrictEqual(stub.firstCall.args[0], object);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import { default as sinon, type SinonSpy } from 'sinon';
import { AsyncClosureDispatchQueue, type QueueClosure } from 'keyman/engine/gesture-processor';
@ -233,4 +236,4 @@ describe('AsyncClosureDispatchQueue', () => {
fakeTimers.restore();
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
import path from 'path';
@ -289,4 +292,4 @@ describe("GesturePath", function() {
this.fakeClock.restore();
})
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import { GestureDebugSource, InputSample } from 'keyman/engine/gesture-processor';
@ -217,4 +220,4 @@ describe("GestureSource", function() {
source.popRecognizerConfig();
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
import * as PromiseStatusModule from 'promise-status-async';
@ -908,4 +911,4 @@ describe("GestureMatcher", function() {
assert.isTrue(sources[0].path.isComplete);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { GestureModelDefs, gestures } from 'keyman/engine/gesture-processor';
@ -44,4 +47,4 @@ describe("Gesture model definitions", () => {
assert.throws(() => getGestureModelSet(TestGestureModelDefinitions, 'malformed'));
assert.throws(() => getGestureModelSet(TestGestureModelDefinitions, 'unavailable-set'));
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
import * as PromiseStatusModule from 'promise-status-async';
@ -586,4 +589,4 @@ describe("GestureSequence", function() {
await sequenceEmulationAndAssertion(emulationEngine, completionPromise, [sequenceAssertion]);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
@ -749,4 +752,4 @@ describe("MatcherSelector", function () {
});
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
import * as PromiseStatusModule from 'promise-status-async';
@ -746,4 +749,4 @@ describe("PathMatcher", function() {
assert.deepEqual(await modelMatcher.promise, {type: 'reject', cause: 'item'});
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai'
import sinon from 'sinon';
import * as PromiseStatusModule from 'promise-status-async';
@ -1749,4 +1752,4 @@ describe("TouchpointCoordinator", () => {
await runnerPromise;
assert.isEmpty(touchpointCoordinator.activeGestures);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { CumulativePathStats, InputSample } from 'keyman/engine/gesture-processor';
@ -167,4 +170,4 @@ describe("CumulativePathStats", function() {
assert.equal(deaccumulatedSecondHalfStats.initialSample, secondHalfStats.initialSample);
assert.equal(deaccumulatedSecondHalfStats.lastSample, secondHalfStats.lastSample);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
// @ts-ignore // Type info unavailable; doing a npm-install for it breaks things much worse in other ways.
import { JSDOM } from 'jsdom';

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for common utility functions/methods.
*/

View file

@ -1,4 +1,6 @@
/**
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* The custom wordbreaker used by the sil.km.gcc model as of
* https://github.com/keymanapp/lexical-models/pull/265.
* @type {WordBreakingFunction}
@ -126,4 +128,4 @@ export function customWordBreakerFormer (str: string) {
length: token.length
}
});
}
}

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import path from 'node:path';
import { createRequire } from "node:module";
import { fileURLToPath } from 'node:url';

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for quote behaviors.
*/

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for common utility functions/methods.
*/

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for the Trie prediction model.
*/

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for the Trie prediction model.
*/

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { ascii as breakASCIIWords } from '@keymanapp/models-wordbreakers';

View file

@ -1,4 +1,6 @@
/**
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Smoke-test the default
*/

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { placeholder as breakWords } from '@keymanapp/models-wordbreakers';

View file

@ -1,4 +1,6 @@
/**
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Smoke-test the default
*/

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { ClassicalDistanceCalculation, EditOperation, EditTuple, forNewIndices } from '@keymanapp/lm-worker/test-index';
import sinon from 'sinon';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { CORRECTION_SEARCH_THRESHOLDS, CorrectionPredictionTupleCore, ModelCompositor, shouldStopSearchingEarly } from "@keymanapp/lm-worker/test-index";
@ -57,4 +60,4 @@ describe('correction-search: shouldStopSearchingEarly', () => {
assert.isFalse(shouldStopSearchingEarly(baseCost, baseCost + expectedThreshold - 0.01, predictions));
assert.isTrue(shouldStopSearchingEarly(baseCost, baseCost + expectedThreshold + 0.01, predictions));
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { useFakeTimers, type SinonFakeTimers } from 'sinon';
@ -379,4 +382,4 @@ describe('ExecutionBucket', () => {
assert.isBelow(bucket.variance, 0.5);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { SegmentableDistanceCalculation } from '@keymanapp/lm-worker/test-index';
@ -205,4 +208,4 @@ describe('Split/merge aware edit-distance calculation', () => {
{ op: 'substitute', input: 3, match: 3 } // 'g' -> 'efgh'
]);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import {
@ -571,4 +574,4 @@ describe('predictionAutoSelect', () => {
// it.skip("properly groups sufficiently-similar suggestions for auto-correction based on engine settings", () => {
// //
// });
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -255,4 +258,4 @@ describe('matchBaseContextState', () => {
warningSpy.restore();
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LexicalModelTypes } from '@keymanapp/common-types';
@ -383,4 +386,4 @@ describe('detectCasing', () => {
deleteLeft: 0
}, context));
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { LexicalModelTypes } from '@keymanapp/common-types';
@ -100,4 +103,4 @@ describe('determineSuggestionAlignment', () => {
assert.equal(results.correctionDeleteLeft, "tech".length /* does not include the deleted whitespace */);
assert.equal(results.committedDeleteLeft, 1 /* for the deleted whitespace */);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import sinon from 'sinon';
@ -453,4 +456,4 @@ describe('determineContextTransition', () => {
warningEmitterSpy.restore();
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import * as wordBreakers from '@keymanapp/models-wordbreakers';
@ -167,4 +170,4 @@ describe('dedupeSuggestions', () => {
assert.deepEqual(deduplicated, expected);
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { QuoteBehavior } from "@keymanapp/models-templates";
@ -417,4 +420,4 @@ describe('processSimilarity', () => {
assert.sameDeepMembers(distribution, expectation);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { TransformUtils } from '@keymanapp/lm-worker/test-index';

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for the Dummy prediction model.
*/

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import fs from 'node:fs';
import { createRequire } from 'node:module';

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Integration tests for the model compositor with the trie model.
*/

View file

@ -1,4 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Unit tests for the Dummy prediction model.
*/

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { createRequire } from 'node:module';
import { assert } from 'chai';

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import { DEVICE_DETECT_FAILURE, setupKMW, teardownKMW } from "../test_utils.js";
@ -195,4 +198,4 @@ if(!device.touchable) {
assert.isNotNull(toolbar, 'The main toolbar element was not added to the page!');
})
});
}
}

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import {
@ -336,4 +339,4 @@ describe('Engine - Browser Interactions', function() {
}); // THEN we run our checks.
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import {
@ -49,4 +52,4 @@ describe('Engine - Chirality', function() {
return await runKeyboardTestFromJSON('resources/json/engine_tests/chirality.json', {usingOSK: true}, assert.equal, baseTimeout);
});
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import {
@ -153,4 +156,4 @@ describe('Event Management', function() {
assert.equal(counterObj.i, fin, "Event handler not called the expected number of times");
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { assert } from 'chai';
import {

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
// A simple "does device detection work properly" unit test.
// We'll let things break after this reports, since this will likely signal a LOT of other failures.
import { assert } from 'chai';
@ -27,4 +30,4 @@ describe('Test Initialization', function() {
assert.fail(err);
}
});
});
});

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
// KeymanWeb test suite - processing of the Karma configuration's client.args parameter.
import { DeviceDetector } from 'keyman/engine/main';
@ -266,4 +269,4 @@ export function toEscapedSupplementaryPairString(code: number) {
const L = ((code - 0x10000) % 0x400 + 0xDC00).toString(16);
return "\\u"+H+"\\u"+L;
}
}

View file

@ -1,3 +1,6 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*/
import { InputSample, buildGestureMatchInspector, GestureSource, GestureSourceSubview, gestures } from 'keyman/engine/gesture-processor';
import { ManagedPromise, timedPromise } from 'keyman/common/web-utils';
@ -417,4 +420,4 @@ export function simulateSelectorInput<Type>(
selectorPromise: testObjPromise,
executor
};
}
}