chore(core): Merge branch 'master' into fix/core/12619-disable-assertions-vcwin-release-build

This commit is contained in:
Marc Durdin 2024-11-28 09:53:45 +07:00
commit e640caaa9c
169 changed files with 355 additions and 86 deletions

View file

@ -1,5 +1,14 @@
# Keyman Version History
## 18.0.146 alpha 2024-11-27
* test(developer): kmcmplib compiler unit tests 5 (#12612)
* refactor(common): move all lexical model types into `LexicalModelTypes` container (#12712)
* refactor(common): move remaining LDML keyboard types into `LdmlKeyboardTypes` (#12713)
* chore(web): rename test files and folders (#12704)
* chore(core): rename test files (#12705)
* chore(linux): rename test files (#12706)
## 18.0.145 alpha 2024-11-26
* docs(windows): update emscripten bash setup (#12700)

View file

@ -1 +1 @@
18.0.146
18.0.147

View file

@ -34,7 +34,7 @@ analytics for Debug are associated with an App Bundle ID
### Compiling From Command Line
1. Launch a command prompt and cd to the directory **keyman/android**
2. Run the top level build script `./build.sh configure build --debug` which will:
2. Run the top level build script `./build.sh configure build:engine build:app --debug` which will:
* Compile KMEA (and its KMW dependency)
* Download default keyboard and dictionary resources as needed
* Compile KMAPro
@ -79,7 +79,7 @@ analytics for Debug are associated with an App Bundle ID
Replace `SERIAL` with the device serial number listed in step 2.
### Compiling the app's offline help
Keyman for Android help is maintained in the Markdown files in android/docs/.
Keyman for Android help is maintained in the Markdown files in android/docs/help.
The script `/resources/build/build-help.inc.sh` uses the `pandoc` tool to convert the Markdown files into html.
```bash
@ -121,7 +121,7 @@ Building these projects follow the same steps as KMAPro:
## How to Build Keyman Engine for Android
1. Open a terminal or Git Bash prompt and go to the Android project folder (e.g. `cd ~/keyman/android/`)
2. Run `./build.sh --debug`
2. Run `./build.sh build:engine --debug`
Keyman Engine for Android library (**keyman-engine.aar**) is now ready to be imported in any project.
@ -167,3 +167,10 @@ dependencies {
````
5. include `import com.keyman.engine.*;` to use Keyman Engine in a class.
### Keyman Engine for Android help content
Keyman Engine for Android help is maintained in the Markdown files in android/docs/engine/.
## Design Documentation
Internal design documents about features pertaining to Keyman for Android and Keyman Engine for Android are maintained in the Markdown files in android/docs/internal/.

View file

@ -0,0 +1,5 @@
# Keyman for Android and Keyman Engine for Android
## Internal Documents
This folder is for storing design documents of new features pertaining to Keyman for Android and Keyman Engine for Android

View file

@ -1,2 +1,3 @@
src/schemas/
obj/
obj/
coverage/

View file

@ -0,0 +1,216 @@
/*
* Keyman is copyright (C) SIL Global. MIT License.
*
* Created by Dr Mark C. Sinclair on 2024-11-28
*
* Test code for string-lists.ts
*/
import 'mocha';
import { assert } from 'chai';
import { StrsItem, StrsOptions, DependencySections, Strs } from '../../src/kmx/kmx-plus/kmx-plus.js';
import { ListIndex, ListItem } from '../../src/ldml-keyboard/string-list.js';
describe('Test of String-List', () => {
describe('Test ListIndex', () => {
it('can construct a ListIndex', () => {
const strsItem = new StrsItem("abc");
const actual = new ListIndex(strsItem);
assert.deepEqual(actual.value, strsItem);
});
it('can check two ListIndex for equality', () => {
const listItemOne = new ListIndex(new StrsItem("abc"));
const listItemTwo = new ListIndex(new StrsItem("abc"));
assert.isTrue(listItemOne.isEqual(listItemTwo));
});
it('can check two different ListIndex are not equal', () => {
const listItemOne = new ListIndex(new StrsItem("abc"));
const listItemTwo = new ListIndex(new StrsItem("def"));
assert.isFalse(listItemOne.isEqual(listItemTwo));
});
it('can check a ListIndex and string for equality', () => {
const listItem = new ListIndex(new StrsItem("abc"));
const aString = "abc";
assert.isTrue(listItem.isEqual(aString));
});
it('can check a ListIndex and string for inequality', () => {
const listItem = new ListIndex(new StrsItem("abc"));
const aString = "def";
assert.isFalse(listItem.isEqual(aString));
});
it('can provide a correct string representation', () => {
const strsItem = new StrsItem("abc");
const listItem = new ListIndex(strsItem);
const expected = "abc";
assert.deepEqual(listItem.toString(), expected);
});
});
describe('Test ListItem', () => {
describe('Test fromStrings()', () => {
it('should return an empty ListItem if source is null', () => {
const actual = ListItem.fromStrings(null, null, null);
const expected = new ListItem();
assert.deepEqual(actual, expected);
});
it('should return a valid ListItem from a single source string', () => {
const source = ["abc"];
const sections = { strs: new Strs };
sections.strs.allocString = stubSectionsStrsAllocString;
const actual = ListItem.fromStrings(source, null, sections);
const expected = initListItem(source);
assert.deepEqual(actual, expected);
});
it('should return a valid ListItem from a longer source', () => {
const source = ["abc", "def", "ghi"];
const sections = { strs: new Strs };
sections.strs.allocString = stubSectionsStrsAllocString;
const actual = ListItem.fromStrings(source, null, sections);
const expected = initListItem(source);
assert.deepEqual(actual, expected);
});
});
describe('Test getItemOrder()', () => {
it('should return a valid index for the first item', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
const index = listItem.getItemOrder("abc");
assert.equal(index, 0);
});
it('should return a valid index for a later item', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
const index = listItem.getItemOrder("ghi");
assert.equal(index, 2);
});
it('should return -1 for a missing item', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
const index = listItem.getItemOrder("jkl");
assert.equal(index, -1);
});
});
describe('Test isEqual()', () => {
it('should return true for two empty ListItems', () => {
const listItemOne = new ListItem();
const listItemTwo = new ListItem();
assert.isTrue(listItemOne.isEqual(listItemTwo));
});
it('should return false for empty and non-empty ListItems', () => {
const listItemOne = new ListItem();
const listItemTwo = initListItem(["abc"]);
assert.isFalse(listItemOne.isEqual(listItemTwo));
});
it('should return false for non-empty and empty ListItems', () => {
const listItemOne = initListItem(["abc"]);
const listItemTwo = new ListItem();
assert.isFalse(listItemOne.isEqual(listItemTwo));
});
it('should return true for identical ListItems', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.isTrue(listItemOne.isEqual(listItemTwo));
});
it('should return false for different ListItems', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abd", "def", "ghi"]);
assert.isFalse(listItemOne.isEqual(listItemTwo));
});
it('should return false for different length ListItems', () => {
const listItemOne = initListItem(["abc", "def"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.isFalse(listItemOne.isEqual(listItemTwo));
});
it('should return true for empty ListItem and string[]', () => {
const listItem = new ListItem();
assert.isTrue(listItem.isEqual([]));
});
it('should return false for empty ListItem and non-empty string[]', () => {
const listItem = new ListItem();
assert.isFalse(listItem.isEqual(["abc"]));
});
it('should return false for non-empty ListItem and empty string[]', () => {
const listItem = initListItem(["abc"]);;
assert.isFalse(listItem.isEqual([]));
});
it('should return true for identical ListItem and string[]', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
assert.isTrue(listItem.isEqual(["abc", "def", "ghi"]));
});
it('should return false for different ListItem and string[]', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
assert.isFalse(listItem.isEqual(["abd", "def", "ghi"]));
});
it('should return false for different length ListItem and string[]', () => {
const listItem = initListItem(["abc", "def"]);
assert.isFalse(listItem.isEqual(["abc", "def", "ghi"]));
});
});
describe('Test compareTo()', () => {
it('should return 0 for identical ListItems', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.equal(listItemOne.compareTo(listItemTwo), 0);
});
it('should return -1 for ListItems with different first items (smallest first)', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abd", "def", "ghi"]);
assert.equal(listItemOne.compareTo(listItemTwo), -1);
});
it('should return 1 for ListItems with different first items (smallest second)', () => {
const listItemOne = initListItem(["abd", "def", "ghi"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.equal(listItemOne.compareTo(listItemTwo), 1);
});
it('should return -1 for ListItems with different later items (smallest first)', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abc", "def", "ghj"]);
assert.equal(listItemOne.compareTo(listItemTwo), -1);
});
it('should return 1 for ListItems with different later items (smallest second)', () => {
const listItemOne = initListItem(["abc", "def", "ghj"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.equal(listItemOne.compareTo(listItemTwo), 1);
});
it('should return -1 for identical ListItems, except shorter first', () => {
const listItemOne = initListItem(["abc", "def", "ghi"]);
const listItemTwo = initListItem(["abc", "def", "ghi", "jkl"]);
assert.equal(listItemOne.compareTo(listItemTwo), -1);
});
it('should return 1 for identical ListItems, except longer first', () => {
const listItemOne = initListItem(["abc", "def", "ghi", "jkl"]);
const listItemTwo = initListItem(["abc", "def", "ghi"]);
assert.equal(listItemOne.compareTo(listItemTwo), 1);
});
});
describe('Test toString()', () => {
it('should return correct string', () => {
const listItem = initListItem(["abc", "def", "ghi"]);
assert.deepEqual(listItem.toString(), "abc def ghi");
});
it('should return correct string for empty ListItem', () => {
const listItem = new ListItem;
assert.deepEqual(listItem.toString(), "");
});
});
describe('Test toStringArray()', () => {
it('should return correct string[]', () => {
const source = ["abc", "def", "ghi"];
const listItem = initListItem(source);
assert.deepEqual(listItem.toStringArray(), source);
});
it('should return correct string[] for empty ListItem', () => {
const listItem = new ListItem;
assert.deepEqual(listItem.toStringArray(), []);
});
});
});
});
function stubSectionsStrsAllocString(s?: string, opts?: StrsOptions, sections?: DependencySections): StrsItem {
return new StrsItem(s);
}
function initListItem(source: Array<string>): ListItem {
const listItem = new ListItem();
for (const s of source) {
listItem.push(new ListIndex(new StrsItem(s)));
}
return listItem;
}

View file

@ -16,18 +16,18 @@ endif
local_defns = ['-DKM_CORE_LIBRARY_STATIC']
tests = [
['action-api', 'action_api.cpp'],
['action-set-api', 'action_set_api.cpp'],
['context-api', 'context_api.cpp'],
['keyboard-api', 'keyboard_api.cpp'],
['options-api', 'options_api.cpp'],
['state-api', 'state_api.cpp'],
['state-context-api', 'state_context_api.cpp'],
['debug-api', 'debug_api.cpp'],
['kmx_xstring', 'test_kmx_xstring.cpp'],
['kmx_context', 'test_kmx_context.cpp'],
['test_actions_normalize', 'test_actions_normalize.cpp'],
['test_actions_get_api', 'test_actions_get_api.cpp'],
['action-api-tests', 'action_api.tests.cpp'],
['action-set-api-tests', 'action_set_api.tests.cpp'],
['context-api-tests', 'context_api.tests.cpp'],
['keyboard-api-tests', 'keyboard_api.tests.cpp'],
['options-api-tests', 'options_api.tests.cpp'],
['state-api-tests', 'state_api.tests.cpp'],
['state-context-api-tests', 'state_context_api.tests.cpp'],
['debug-api-tests', 'debug_api.tests.cpp'],
['kmx_xstring-tests', 'kmx_xstring.tests.cpp'],
['kmx_context-tests', 'kmx_context.tests.cpp'],
['actions_normalize-tests', 'actions_normalize.tests.cpp'],
['actions_get_api-tests', 'actions_get_api.tests.cpp'],
]
test_path = join_paths(meson.current_build_dir(), '..', 'kmx')

View file

@ -174,7 +174,7 @@ subdir('fixtures')
# should work for Linux, macOS, and WASM.
test_path = source_path
key_e = executable('key_list', ['kmx_key_list.cpp', common_test_files],
key_e = executable('key_list_tests', ['kmx_key_list.tests.cpp', common_test_files],
cpp_args: defns + warns,
include_directories: [inc, libsrc],
link_args: links + tests_flags,
@ -193,7 +193,7 @@ test('key_list', key_e, depends: kbd_log, args: [kbd_obj] )
# test for imx list
imx_e = executable('imx_list', ['kmx_imx.cpp', common_test_files],
imx_e = executable('imx_list_tests', ['kmx_imx.tests.cpp', common_test_files],
cpp_args: defns + warns,
include_directories: [inc, libsrc],
link_args: links + tests_flags,
@ -211,7 +211,7 @@ kbd_log = custom_target(test_kbd + '.kmx'.underscorify(),
)
test('imx_list', imx_e, depends: kbd_log, args: [kbd_obj] )
external_e = executable('ext_event', ['kmx_external_event.cpp', common_test_files],
external_e = executable('ext_event_tests', ['kmx_external_event.tests.cpp', common_test_files],
cpp_args: defns + warns,
include_directories: [inc, libsrc],
link_args: links + tests_flags,

View file

@ -82,8 +82,8 @@ ldml = executable('ldml',
objects: lib.extract_all_objects(recursive: false),
)
core_ldml_min = executable('core_ldml_min',
['core_ldml_min.cpp',
core_ldml_min = executable('core_ldml_min_tests',
['core_ldml_min.tests.cpp',
common_test_files],
cpp_args: defns + warns,
include_directories: [inc, libsrc],
@ -92,12 +92,12 @@ core_ldml_min = executable('core_ldml_min',
link_with: [lib],
# objects: lib.extract_all_objects(recursive: false),
)
test('core_ldml_min', core_ldml_min, suite: 'ldml', should_fail: true)
test('core_ldml_min_tests', core_ldml_min, suite: 'ldml', should_fail: true)
# Build and run additional test_kmx_plus test
e = executable('test_kmx_plus', 'test_kmx_plus.cpp',
e = executable('kmx_plus_tests', 'kmx_plus.tests.cpp',
'ldml_test_utils.cpp',
common_test_files,
cpp_args: defns + warns,
@ -105,18 +105,18 @@ e = executable('test_kmx_plus', 'test_kmx_plus.cpp',
link_args: links + tests_flags,
dependencies: [icu_uc, icu_i18n],
objects: lib.extract_all_objects(recursive: false))
test('test_kmx_plus', e, suite: 'ldml')
test('kmx_plus_tests', e, suite: 'ldml')
# run transforms / ldml utilities unit test
t = executable('test_transforms', 'test_transforms.cpp',
t = executable('transforms_tests', 'transforms.tests.cpp',
common_test_files,
cpp_args: defns + warns,
include_directories: [inc, libsrc, '../../../../developer/src/ext/json'],
link_args: links + tests_flags,
dependencies: [icu_uc, icu_i18n],
objects: lib.extract_all_objects(recursive: false))
test('test_transforms', t, suite: 'ldml')
test('transforms_tests', t, suite: 'ldml')
# run test_context_normalization ldml unit test
@ -126,19 +126,19 @@ if cpp_compiler.get_id() == 'emscripten'
normalization_tests_flags += ['-lnodefs.js', wasm_exported_runtime_methods]
endif
test_context_normalization = executable('test_context_normalization',
['test_context_normalization.cpp', common_test_files],
test_context_normalization = executable('context_normalization_tests',
['context_normalization.tests.cpp', common_test_files],
cpp_args: defns + warns,
include_directories: [inc, libsrc, '../../../../developer/src/ext/json'],
link_args: links + normalization_tests_flags,
dependencies: [icu_uc, icu_i18n],
objects: lib.extract_all_objects(recursive: false))
test('test_context_normalization', test_context_normalization, suite: 'ldml')
test('context_normalization_tests', test_context_normalization, suite: 'ldml')
# Build and run additional test_unicode test
test_unicode = executable('test_unicode', 'test_unicode.cpp',
['test_unicode.cpp', common_test_files, generated_headers],
test_unicode = executable('unicode_tests', 'unicode.tests.cpp',
['unicode.tests.cpp', common_test_files, generated_headers],
cpp_args: defns + warns,
include_directories: [inc, libsrc, '../../../../developer/src/ext/json'],
link_args: links + tests_flags,
@ -147,7 +147,7 @@ test_unicode = executable('test_unicode', 'test_unicode.cpp',
)
test('test_unicode', test_unicode, suite: 'ldml',
test('unicode_tests', test_unicode, suite: 'ldml',
args: [
test_unicode_path / 'nodeversions.json',
test_unicode_path / 'package.json',

View file

@ -4,7 +4,7 @@
# Authors: Tim Eves (TSE)
#
e = executable('utftest', 'utftest.cpp',
e = executable('utftest', 'utftest.tests.cpp',
objects: lib.extract_objects('../../common/cpp/utfcodec.cpp'),
include_directories: [libsrc])
test('utftest', e)

View file

@ -70,10 +70,23 @@ git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.58
./emsdk activate 3.1.58
export EMSCRIPTEN_BASE="$(pwd)/upstream/emscripten"
cd upstream/emscripten
npm install
export EMSCRIPTEN_BASE="$(pwd)"
echo "export EMSCRIPTEN_BASE=\"$EMSCRIPTEN_BASE\"" >> .bashrc
```
If you are updating an existing install of Emscripten:
```bash
cd emsdk
git pull
./emsdk install 3.1.58
./emsdk activate 3.1.58
cd upstream/emscripten
npm install
```
> ![WARNING]
> Don't put EMSDK on the path, i.e. don't source `emsdk_env.sh`.
>

15
docs/build/macos.md vendored
View file

@ -101,10 +101,23 @@ git clone https://github.com/emscripten-core/emsdk
cd emsdk
emsdk install 3.1.58
emsdk activate 3.1.58
export EMSCRIPTEN_BASE="$(pwd)/upstream/emscripten"
cd upstream/emscripten
npm install
export EMSCRIPTEN_BASE="$(pwd)"
echo "export EMSCRIPTEN_BASE=\"$EMSCRIPTEN_BASE\"" >> .bashrc
```
If you are updating an existing install of Emscripten:
```bash
cd emsdk
git pull
emsdk install 3.1.58
emsdk activate 3.1.58
cd upstream/emscripten
npm install
```
You will want to add `EMSCRIPTEN_BASE` to your .bashrc.
> ![WARNING]

View file

@ -64,6 +64,10 @@ To just run the unit tests without integration tests, add the
It's also possible to only run the tests for one of the subprojects. You
can use `build.sh` in the subdirectory for that.
Unit tests should be named after the file/class they are testing and
follow the pattern `*.tests.<ext>` (e.g. `keymanutil.tests.c`) or
for Python `*_tests.py`.
### ibus-keyman
If you want to run the ibus-keyman tests with Wayland, you'll have to

View file

@ -200,7 +200,7 @@ LANGUAGE=de ./km-config
"python.testing.unittestArgs": [
"-v",
"-s", "linux/keyman-config/tests",
"-p", "test_*.py"
"-p", "*_tests.py"
],
"python.testing.unittestEnabled": true,
```

View file

@ -62,7 +62,7 @@
"request": "launch",
"name": "Launch ibus-keyman unit tests",
"target": "./keymanutil_tests",
"cwd": "${workspaceFolder}/linux/build/x86_64/debug/src/test",
"cwd": "${workspaceFolder}/linux/build/x86_64/debug/src/tests",
"valuesFormatting": "parseText",
"internalConsoleOptions": "openOnSessionStart",
"env": {

View file

@ -5,7 +5,7 @@
"python.testing.unittestArgs": [
"-v",
"-s", "linux/keyman-config/tests",
"-p", "test_*.py"
"-p", "*_tests.py"
],
"python.testing.unittestEnabled": true,
"python.testing.pytestEnabled": false,

2
linux/.gitignore vendored
View file

@ -31,7 +31,7 @@ debianpackage/
*.tar.xz
*.tar.gz
*.dsc
help/reference/
docs/help/reference/
# Cached/auto-compiled Python bytecode
*.pyc

View file

@ -1,5 +1,5 @@
keymanutil_sources = [
'keymanutil_tests.c',
'keymanutil.tests.c',
util_files,
]
@ -55,7 +55,7 @@ print_kmp_test = executable(
bcp47_util_tests = executable(
'bcp47-util-tests',
sources: [
'bcp47util_tests.c',
'bcp47util.tests.c',
'../bcp47util.c'
],
dependencies: [ gtk, icu ],

View file

@ -1,18 +1,18 @@
#!/bin/bash
PYTHONPATH=.:$PYTHONPATH
PYTHONPATH=.:${PYTHONPATH}
XDG_CONFIG_HOME=$(mktemp --directory)
export XDG_CONFIG_HOME
if [ -f /usr/libexec/ibus-memconf ]; then
if [[ -f /usr/libexec/ibus-memconf ]]; then
export GSETTINGS_BACKEND=keyfile
fi
if [ "$1" == "--coverage" ]; then
if [[ "$1" == "--coverage" ]]; then
coverage="-m coverage run --source=. --data-file=build/.coverage"
fi
if [ -n "$TEAMCITY_VERSION" ]; then
if [[ -n "${TEAMCITY_VERSION}" ]]; then
if ! pip3 list --format=columns | grep -q teamcity-messages; then
pip3 install teamcity-messages
fi
@ -23,6 +23,6 @@ else
fi
# shellcheck disable=SC2086
python3 ${coverage:-} -m ${test_module:-} discover ${extra_opts:-} -s tests -p test_*.py
python3 ${coverage:-} -m "${test_module:-}" discover ${extra_opts:-} -s tests/ -p "*_tests.py"
rm -rf "$XDG_CONFIG_HOME"
rm -rf "${XDG_CONFIG_HOME}"

View file

@ -55,7 +55,7 @@ fi
builder_describe_outputs \
configure "/node_modules" \
build "/web/build/test/dom/cases/attachment/outputTargetForElement.spec.html" \
build "/web/build/test/dom/cases/attachment/outputTargetForElement.tests.html" \
build:app/browser "/web/build/app/browser/lib/index.mjs" \
build:app/webview "/web/build/app/webview/${config}/keymanweb-webview.js" \
build:app/ui "/web/build/app/ui/${config}/kmwuitoggle.js" \
@ -127,7 +127,7 @@ build_action() {
precompile "${dir}"
done
cp "${KEYMAN_ROOT}/web/src/test/auto/dom/cases/attachment/outputTargetForElement.spec.html" \
cp "${KEYMAN_ROOT}/web/src/test/auto/dom/cases/attachment/outputTargetForElement.tests.html" \
"${KEYMAN_ROOT}/web/build/test/dom/cases/attachment/"
}

View file

@ -6,7 +6,7 @@
"src/deviceSpec.ts",
"src/globalObject.ts",
"node_modules/*",
"src/test"
"src/tests/*"
],
"exclude-after-remap": true,
"reporter": ["text", "text-summary"],

View file

@ -11,7 +11,6 @@ dist/
# Other local files.
node_modules/
unit_tests/modernizr.js
source/environment.inc.ts
**/.idea/**/*.xml
**/*.iml

View file

@ -54,7 +54,7 @@ function do_test() {
FLAGS="$FLAGS --reporter mocha-teamcity-reporter"
fi
c8 mocha --recursive $FLAGS ./src/test/
c8 mocha --recursive $FLAGS ./src/tests/
}
builder_run_action configure verify_npm_setup

View file

@ -13,6 +13,6 @@
"src/*.ts"
],
"exclude": [
"src/test/**/*.js"
"src/tests/**/*.js"
]
}

View file

@ -3,7 +3,7 @@
"clean": true,
"exclude": [
"node_modules/**",
"test/**"
"tests/**"
],
"exclude-after-remap": true,
"reporter": ["text", "text-summary"],

View file

@ -42,7 +42,7 @@ function do_test() {
FLAGS="-reporter mocha-teamcity-reporter"
fi
c8 mocha $FLAGS --require test/helpers.js --recursive test
c8 mocha $FLAGS --require tests/helpers.js --recursive tests
}
builder_run_action configure verify_npm_setup

View file

@ -31,7 +31,7 @@
"type": "module",
"directories": {
"test": "test"
"test": "tests"
},
"files": [
"index.js"

View file

@ -16,6 +16,6 @@
"src/**/*.ts"
],
"exclude": [
"test"
"tests"
]
}

View file

@ -3,7 +3,7 @@
"clean": true,
"exclude": [
"node_modules/*",
"test"
"tests"
],
"exclude-after-remap": true,
"reporter": ["text", "text-summary"],

View file

@ -45,11 +45,13 @@ function do_build() {
}
function do_test() {
local FLAGS=
if builder_has_option --ci; then
c8 mocha -reporter mocha-teamcity-reporter
else
c8 mocha
FLAGS="-reporter mocha-teamcity-reporter"
fi
c8 mocha ${FLAGS} tests
}
builder_run_action configure do_configure

View file

@ -34,7 +34,7 @@
},
"directories": {
"lib": "lib",
"test": "test"
"test": "tests"
},
"files": [
"lib"

View file

@ -19,7 +19,7 @@ export default {
concurrency: 10,
nodeResolve: true,
files: [
'**/*.spec.ts'
'**/*.tests.ts'
],
middleware: [
// Rewrites short-hand paths for test resources, making them fully relative to the repo root.

View file

@ -2,7 +2,7 @@
"check-coverage": false,
"clean": true,
"exclude": [
"src/test/**",
"src/tests/**",
"node_modules/*"
],
"exclude-after-remap": true,

View file

@ -107,9 +107,9 @@ function do_test() {
WTR_DEBUG=" --manual"
fi
c8 mocha --recursive $MOCHA_FLAGS ./src/test/mocha/cases/
c8 mocha --recursive $MOCHA_FLAGS ./src/tests/mocha/cases/
web-test-runner --config ./src/test/test-runner/web-test-runner${WTR_CONFIG}.config.mjs ${WTR_DEBUG}
web-test-runner --config ./src/tests/test-runner/web-test-runner${WTR_CONFIG}.config.mjs ${WTR_DEBUG}
}
builder_run_action configure do_configure

Some files were not shown because too many files have changed in this diff Show more