mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-06 14:07:32 +00:00
feat(common/web): adds c8 for web/utils, web/keyboard-processor
This commit is contained in:
parent
833f3aed40
commit
b41b619dfd
17 changed files with 47 additions and 16 deletions
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
import esbuild from 'esbuild';
|
||||
import { spawn } from 'child_process';
|
||||
|
||||
// Bundled ES module version
|
||||
esbuild.buildSync({
|
||||
|
|
|
|||
15
common/web/keyboard-processor/.c8rc.json
Normal file
15
common/web/keyboard-processor/.c8rc.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude": [
|
||||
"src/keyboards/loaders/dom*",
|
||||
"node_modules/*",
|
||||
"tests"
|
||||
],
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "build/coverage",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
import esbuild from 'esbuild';
|
||||
import { spawn } from 'child_process';
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
const commonConfig = {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ if builder_start_action test; then
|
|||
KARMA_CONFIG=CI.conf.cjs
|
||||
fi
|
||||
|
||||
mocha --recursive $MOCHA_FLAGS ./tests/node/
|
||||
c8 mocha --recursive $MOCHA_FLAGS ./tests/node/
|
||||
karma start ./tests/dom/$KARMA_CONFIG
|
||||
|
||||
builder_finish_action success test
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
"homepage": "https://github.com/keymanapp/keyman#readme",
|
||||
"devDependencies": {
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"karma": "^6.4.1",
|
||||
"karma-chai": "^0.1.0",
|
||||
|
|
@ -35,7 +36,8 @@
|
|||
"clean": "tsc -b --clean tsconfig.json",
|
||||
"karma": "karma",
|
||||
"test": "gosh ./test.sh",
|
||||
"mocha": "mocha"
|
||||
"mocha": "mocha",
|
||||
"c8": "c8"
|
||||
},
|
||||
"dependencies": {
|
||||
"@keymanapp/models-types": "*",
|
||||
|
|
|
|||
|
|
@ -548,6 +548,7 @@ export class Layouts {
|
|||
}
|
||||
|
||||
// Defines the default visual layout for a keyboard.
|
||||
/* c8 ignore start */
|
||||
static dfltLayout: LayoutSpec = {
|
||||
"desktop":
|
||||
{
|
||||
|
|
@ -847,4 +848,5 @@ export class Layouts {
|
|||
]
|
||||
}
|
||||
};
|
||||
/* c8 ignore end */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
"importHelpers": true,
|
||||
"inlineSources": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "keyman/",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"lib": ["es6"],
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
"declaration": true,
|
||||
"inlineSources": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "keyman/",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"lib": ["es6"],
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
// This specific module is allowed to reference the DOM in order to facilitate loading the keyboards
|
||||
// into the DOM.
|
||||
|
||||
///<reference lib="dom" />
|
||||
|
||||
|
|
@ -9,7 +9,6 @@
|
|||
"importHelpers": true,
|
||||
"inlineSources": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "keyman/",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"lib": ["es6"],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
"importHelpers": true,
|
||||
"inlineSources": true,
|
||||
"sourceMap": true,
|
||||
"sourceRoot": "keyman/",
|
||||
"target": "es5",
|
||||
"types": ["node"],
|
||||
"lib": ["es6"],
|
||||
|
|
|
|||
17
common/web/utils/.c8rc.json
Normal file
17
common/web/utils/.c8rc.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"clean": true,
|
||||
"exclude": [
|
||||
"src/deviceSpec.ts",
|
||||
"src/globalObject.ts",
|
||||
"node_modules/*",
|
||||
"src/test"
|
||||
],
|
||||
"exclude-after-remap": true,
|
||||
"reporter": ["text", "text-summary"],
|
||||
"reports-dir": "build/coverage",
|
||||
"src": [
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ if builder_start_action test; then
|
|||
FLAGS="$FLAGS --reporter mocha-teamcity-reporter"
|
||||
fi
|
||||
|
||||
mocha --recursive $FLAGS ./src/test/
|
||||
c8 mocha --recursive $FLAGS ./src/test/
|
||||
|
||||
builder_finish_action success test
|
||||
fi
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "gosh ./build.sh",
|
||||
"c8": "c8",
|
||||
"clean": "tsc -b --clean",
|
||||
"mocha": "mocha",
|
||||
"tsc": "tsc"
|
||||
|
|
@ -36,6 +37,7 @@
|
|||
"devDependencies": {
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"@keymanapp/keyman-version": "*",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-teamcity-reporter": "^4.0.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import ManagedPromise from '../../build/obj/managedPromise.js';
|
||||
import { ManagedPromise } from '@keymanapp/web-utils';
|
||||
|
||||
describe("ManagedPromise", () => {
|
||||
it('<void> resolution', async () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
|
||||
import Version from '../../build/obj/version.js';
|
||||
import { Version } from '@keymanapp/web-utils';
|
||||
|
||||
describe('Version Logic', function() {
|
||||
it('Should provide a default, fallback value when nothing is specified', function() {
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -227,6 +227,7 @@
|
|||
"@keymanapp/kmc": "*",
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"@types/node": "^11.9.4",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-teamcity-reporter": "^4.0.0",
|
||||
|
|
@ -245,6 +246,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"karma": "^6.4.1",
|
||||
"karma-chai": "^0.1.0",
|
||||
|
|
@ -296,6 +298,7 @@
|
|||
"@keymanapp/models-types": "*",
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"@types/node": "^10.17.21",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"combine-source-map": "^0.8.0",
|
||||
"karma": "^6.4.1",
|
||||
|
|
@ -608,6 +611,7 @@
|
|||
"@keymanapp/keyman-version": "*",
|
||||
"@keymanapp/resources-gosh": "*",
|
||||
"@types/node": "^14.0.5",
|
||||
"c8": "^7.12.0",
|
||||
"chai": "^4.3.4",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-teamcity-reporter": "^4.0.0",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue