diff --git a/HISTORY.md b/HISTORY.md index 282950db67..b2771fd853 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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) diff --git a/VERSION.md b/VERSION.md index aa8a5efd51..1c488bbaed 100644 --- a/VERSION.md +++ b/VERSION.md @@ -1 +1 @@ -18.0.146 \ No newline at end of file +18.0.147 \ No newline at end of file diff --git a/android/README.md b/android/README.md index 8b32b99f54..6abb94161d 100644 --- a/android/README.md +++ b/android/README.md @@ -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/. diff --git a/android/docs/internal/README.md b/android/docs/internal/README.md new file mode 100644 index 0000000000..ef51df7f60 --- /dev/null +++ b/android/docs/internal/README.md @@ -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 diff --git a/common/web/types/.gitignore b/common/web/types/.gitignore index 2f943a2f4e..dcb567b832 100644 --- a/common/web/types/.gitignore +++ b/common/web/types/.gitignore @@ -1,2 +1,3 @@ src/schemas/ -obj/ \ No newline at end of file +obj/ +coverage/ diff --git a/common/web/types/test/ldml-keyboard/test-string-list.ts b/common/web/types/test/ldml-keyboard/test-string-list.ts new file mode 100644 index 0000000000..58365bda66 --- /dev/null +++ b/common/web/types/test/ldml-keyboard/test-string-list.ts @@ -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): ListItem { + const listItem = new ListItem(); + for (const s of source) { + listItem.push(new ListIndex(new StrsItem(s))); + } + return listItem; +} diff --git a/core/tests/unit/kmnkbd/action_api.cpp b/core/tests/unit/kmnkbd/action_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/action_api.cpp rename to core/tests/unit/kmnkbd/action_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/action_set_api.cpp b/core/tests/unit/kmnkbd/action_set_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/action_set_api.cpp rename to core/tests/unit/kmnkbd/action_set_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_actions_get_api.cpp b/core/tests/unit/kmnkbd/actions_get_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_actions_get_api.cpp rename to core/tests/unit/kmnkbd/actions_get_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_actions_normalize.cpp b/core/tests/unit/kmnkbd/actions_normalize.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_actions_normalize.cpp rename to core/tests/unit/kmnkbd/actions_normalize.tests.cpp diff --git a/core/tests/unit/kmnkbd/context_api.cpp b/core/tests/unit/kmnkbd/context_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/context_api.cpp rename to core/tests/unit/kmnkbd/context_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/debug_api.cpp b/core/tests/unit/kmnkbd/debug_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/debug_api.cpp rename to core/tests/unit/kmnkbd/debug_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/keyboard_api.cpp b/core/tests/unit/kmnkbd/keyboard_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/keyboard_api.cpp rename to core/tests/unit/kmnkbd/keyboard_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_kmx_context.cpp b/core/tests/unit/kmnkbd/kmx_context.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_kmx_context.cpp rename to core/tests/unit/kmnkbd/kmx_context.tests.cpp diff --git a/core/tests/unit/kmnkbd/test_kmx_xstring.cpp b/core/tests/unit/kmnkbd/kmx_xstring.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/test_kmx_xstring.cpp rename to core/tests/unit/kmnkbd/kmx_xstring.tests.cpp diff --git a/core/tests/unit/kmnkbd/meson.build b/core/tests/unit/kmnkbd/meson.build index 7285b9bf11..c108ae5b83 100644 --- a/core/tests/unit/kmnkbd/meson.build +++ b/core/tests/unit/kmnkbd/meson.build @@ -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') diff --git a/core/tests/unit/kmnkbd/options_api.cpp b/core/tests/unit/kmnkbd/options_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/options_api.cpp rename to core/tests/unit/kmnkbd/options_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/state_api.cpp b/core/tests/unit/kmnkbd/state_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/state_api.cpp rename to core/tests/unit/kmnkbd/state_api.tests.cpp diff --git a/core/tests/unit/kmnkbd/state_context_api.cpp b/core/tests/unit/kmnkbd/state_context_api.tests.cpp similarity index 100% rename from core/tests/unit/kmnkbd/state_context_api.cpp rename to core/tests/unit/kmnkbd/state_context_api.tests.cpp diff --git a/core/tests/unit/kmx/kmx_external_event.cpp b/core/tests/unit/kmx/kmx_external_event.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_external_event.cpp rename to core/tests/unit/kmx/kmx_external_event.tests.cpp diff --git a/core/tests/unit/kmx/kmx_imx.cpp b/core/tests/unit/kmx/kmx_imx.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_imx.cpp rename to core/tests/unit/kmx/kmx_imx.tests.cpp diff --git a/core/tests/unit/kmx/kmx_key_list.cpp b/core/tests/unit/kmx/kmx_key_list.tests.cpp similarity index 100% rename from core/tests/unit/kmx/kmx_key_list.cpp rename to core/tests/unit/kmx/kmx_key_list.tests.cpp diff --git a/core/tests/unit/kmx/meson.build b/core/tests/unit/kmx/meson.build index 548ab89522..a7a69079e4 100644 --- a/core/tests/unit/kmx/meson.build +++ b/core/tests/unit/kmx/meson.build @@ -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, diff --git a/core/tests/unit/ldml/test_context_normalization.cpp b/core/tests/unit/ldml/context_normalization.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_context_normalization.cpp rename to core/tests/unit/ldml/context_normalization.tests.cpp diff --git a/core/tests/unit/ldml/core_ldml_min.cpp b/core/tests/unit/ldml/core_ldml_min.tests.cpp similarity index 100% rename from core/tests/unit/ldml/core_ldml_min.cpp rename to core/tests/unit/ldml/core_ldml_min.tests.cpp diff --git a/core/tests/unit/ldml/test_kmx_plus.cpp b/core/tests/unit/ldml/kmx_plus.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_kmx_plus.cpp rename to core/tests/unit/ldml/kmx_plus.tests.cpp diff --git a/core/tests/unit/ldml/meson.build b/core/tests/unit/ldml/meson.build index df328e47fa..9152612282 100644 --- a/core/tests/unit/ldml/meson.build +++ b/core/tests/unit/ldml/meson.build @@ -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', diff --git a/core/tests/unit/ldml/test_transforms.cpp b/core/tests/unit/ldml/transforms.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_transforms.cpp rename to core/tests/unit/ldml/transforms.tests.cpp diff --git a/core/tests/unit/ldml/test_unicode.cpp b/core/tests/unit/ldml/unicode.tests.cpp similarity index 100% rename from core/tests/unit/ldml/test_unicode.cpp rename to core/tests/unit/ldml/unicode.tests.cpp diff --git a/core/tests/unit/utftest/meson.build b/core/tests/unit/utftest/meson.build index 4ab6cb74ca..c82b6f98c5 100644 --- a/core/tests/unit/utftest/meson.build +++ b/core/tests/unit/utftest/meson.build @@ -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) diff --git a/core/tests/unit/utftest/utftest.cpp b/core/tests/unit/utftest/utftest.tests.cpp similarity index 100% rename from core/tests/unit/utftest/utftest.cpp rename to core/tests/unit/utftest/utftest.tests.cpp diff --git a/docs/build/linux-ubuntu.md b/docs/build/linux-ubuntu.md index a45d9390ba..37b2aafa1a 100644 --- a/docs/build/linux-ubuntu.md +++ b/docs/build/linux-ubuntu.md @@ -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`. > diff --git a/docs/build/macos.md b/docs/build/macos.md index 25b0c1f82a..f961942070 100644 --- a/docs/build/macos.md +++ b/docs/build/macos.md @@ -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] diff --git a/docs/linux/README.md b/docs/linux/README.md index fe29b0d623..80c1a78434 100644 --- a/docs/linux/README.md +++ b/docs/linux/README.md @@ -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.` (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 diff --git a/docs/linux/keyman-config.md b/docs/linux/keyman-config.md index 93ed3ffd8b..1a039d0f5e 100644 --- a/docs/linux/keyman-config.md +++ b/docs/linux/keyman-config.md @@ -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, ``` diff --git a/docs/settings/linux/launch.json b/docs/settings/linux/launch.json index e29c16fa45..fec5afe0ad 100644 --- a/docs/settings/linux/launch.json +++ b/docs/settings/linux/launch.json @@ -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": { diff --git a/docs/settings/linux/settings.json b/docs/settings/linux/settings.json index 482630bdec..3fd13430d1 100644 --- a/docs/settings/linux/settings.json +++ b/docs/settings/linux/settings.json @@ -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, diff --git a/linux/.gitignore b/linux/.gitignore index f85acc0f35..a67e991b30 100644 --- a/linux/.gitignore +++ b/linux/.gitignore @@ -31,7 +31,7 @@ debianpackage/ *.tar.xz *.tar.gz *.dsc -help/reference/ +docs/help/reference/ # Cached/auto-compiled Python bytecode *.pyc diff --git a/linux/ibus-keyman/src/test/bcp47util_tests.c b/linux/ibus-keyman/src/test/bcp47util.tests.c similarity index 100% rename from linux/ibus-keyman/src/test/bcp47util_tests.c rename to linux/ibus-keyman/src/test/bcp47util.tests.c diff --git a/linux/ibus-keyman/src/test/keymanutil_tests.c b/linux/ibus-keyman/src/test/keymanutil.tests.c similarity index 100% rename from linux/ibus-keyman/src/test/keymanutil_tests.c rename to linux/ibus-keyman/src/test/keymanutil.tests.c diff --git a/linux/ibus-keyman/src/test/meson.build b/linux/ibus-keyman/src/test/meson.build index 333f05c212..f1f34a63c5 100644 --- a/linux/ibus-keyman/src/test/meson.build +++ b/linux/ibus-keyman/src/test/meson.build @@ -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 ], diff --git a/linux/keyman-config/run-tests.sh b/linux/keyman-config/run-tests.sh index de99c55e8f..41904e4cf3 100755 --- a/linux/keyman-config/run-tests.sh +++ b/linux/keyman-config/run-tests.sh @@ -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}" diff --git a/linux/keyman-config/tests/test_bcp47tag.py b/linux/keyman-config/tests/bcp47tag_tests.py similarity index 100% rename from linux/keyman-config/tests/test_bcp47tag.py rename to linux/keyman-config/tests/bcp47tag_tests.py diff --git a/linux/keyman-config/tests/test_canonical_language_code_utils.py b/linux/keyman-config/tests/canonical_language_code_utils_tests.py similarity index 100% rename from linux/keyman-config/tests/test_canonical_language_code_utils.py rename to linux/keyman-config/tests/canonical_language_code_utils_tests.py diff --git a/linux/keyman-config/tests/test_custom_keyboards.py b/linux/keyman-config/tests/custom_keyboards_tests.py similarity index 100% rename from linux/keyman-config/tests/test_custom_keyboards.py rename to linux/keyman-config/tests/custom_keyboards_tests.py diff --git a/linux/keyman-config/tests/test_dconf_util.py b/linux/keyman-config/tests/dconf_util_tests.py similarity index 100% rename from linux/keyman-config/tests/test_dconf_util.py rename to linux/keyman-config/tests/dconf_util_tests.py diff --git a/linux/keyman-config/tests/test_get_kmp.py b/linux/keyman-config/tests/get_kmp_tests.py similarity index 100% rename from linux/keyman-config/tests/test_get_kmp.py rename to linux/keyman-config/tests/get_kmp_tests.py diff --git a/linux/keyman-config/tests/test_gnome_keyboards_util.py b/linux/keyman-config/tests/gnome_keyboards_util_tests.py similarity index 100% rename from linux/keyman-config/tests/test_gnome_keyboards_util.py rename to linux/keyman-config/tests/gnome_keyboards_util_tests.py diff --git a/linux/keyman-config/tests/test_gsettings.py b/linux/keyman-config/tests/gsettings_tests.py similarity index 100% rename from linux/keyman-config/tests/test_gsettings.py rename to linux/keyman-config/tests/gsettings_tests.py diff --git a/linux/keyman-config/tests/test_handle_install.py b/linux/keyman-config/tests/handle_install_tests.py similarity index 100% rename from linux/keyman-config/tests/test_handle_install.py rename to linux/keyman-config/tests/handle_install_tests.py diff --git a/linux/keyman-config/tests/test_ibus_util.py b/linux/keyman-config/tests/ibus_util_tests.py similarity index 100% rename from linux/keyman-config/tests/test_ibus_util.py rename to linux/keyman-config/tests/ibus_util_tests.py diff --git a/linux/keyman-config/tests/test_install_kmp.py b/linux/keyman-config/tests/install_kmp_tests.py similarity index 100% rename from linux/keyman-config/tests/test_install_kmp.py rename to linux/keyman-config/tests/install_kmp_tests.py diff --git a/linux/keyman-config/tests/test_kvk2ldml.py b/linux/keyman-config/tests/kvk2ldml_tests.py similarity index 100% rename from linux/keyman-config/tests/test_kvk2ldml.py rename to linux/keyman-config/tests/kvk2ldml_tests.py diff --git a/linux/keyman-config/tests/test_lang_tags_map.py b/linux/keyman-config/tests/lang_tags_map_tests.py similarity index 100% rename from linux/keyman-config/tests/test_lang_tags_map.py rename to linux/keyman-config/tests/lang_tags_map_tests.py diff --git a/linux/keyman-config/tests/test_package_install_completion.py b/linux/keyman-config/tests/package_install_completion_tests.py similarity index 100% rename from linux/keyman-config/tests/test_package_install_completion.py rename to linux/keyman-config/tests/package_install_completion_tests.py diff --git a/linux/keyman-config/tests/test_uninstall_kmp.py b/linux/keyman-config/tests/uninstall_kmp_tests.py similarity index 100% rename from linux/keyman-config/tests/test_uninstall_kmp.py rename to linux/keyman-config/tests/uninstall_kmp_tests.py diff --git a/web/build.sh b/web/build.sh index 6f1846dc6a..d01d493517 100755 --- a/web/build.sh +++ b/web/build.sh @@ -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/" } diff --git a/web/src/engine/common/web-utils/.c8rc.json b/web/src/engine/common/web-utils/.c8rc.json index d9074b62f3..16a4e93b9c 100644 --- a/web/src/engine/common/web-utils/.c8rc.json +++ b/web/src/engine/common/web-utils/.c8rc.json @@ -6,7 +6,7 @@ "src/deviceSpec.ts", "src/globalObject.ts", "node_modules/*", - "src/test" + "src/tests/*" ], "exclude-after-remap": true, "reporter": ["text", "text-summary"], diff --git a/web/src/engine/common/web-utils/.gitignore b/web/src/engine/common/web-utils/.gitignore index a9e0c25514..56baafc822 100644 --- a/web/src/engine/common/web-utils/.gitignore +++ b/web/src/engine/common/web-utils/.gitignore @@ -11,7 +11,6 @@ dist/ # Other local files. node_modules/ -unit_tests/modernizr.js source/environment.inc.ts **/.idea/**/*.xml **/*.iml diff --git a/web/src/engine/common/web-utils/build.sh b/web/src/engine/common/web-utils/build.sh index 303bd2664b..ac18e2984c 100755 --- a/web/src/engine/common/web-utils/build.sh +++ b/web/src/engine/common/web-utils/build.sh @@ -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 diff --git a/web/src/engine/common/web-utils/src/test/deepCopy.js b/web/src/engine/common/web-utils/src/tests/deepCopy.tests.js similarity index 100% rename from web/src/engine/common/web-utils/src/test/deepCopy.js rename to web/src/engine/common/web-utils/src/tests/deepCopy.tests.js diff --git a/web/src/engine/common/web-utils/src/test/managedPromise.js b/web/src/engine/common/web-utils/src/tests/managedPromise.tests.js similarity index 100% rename from web/src/engine/common/web-utils/src/test/managedPromise.js rename to web/src/engine/common/web-utils/src/tests/managedPromise.tests.js diff --git a/web/src/engine/common/web-utils/src/test/priorityQueue.js b/web/src/engine/common/web-utils/src/tests/priorityQueue.tests.js similarity index 100% rename from web/src/engine/common/web-utils/src/test/priorityQueue.js rename to web/src/engine/common/web-utils/src/tests/priorityQueue.tests.js diff --git a/web/src/engine/common/web-utils/src/test/timeoutPromise.js b/web/src/engine/common/web-utils/src/tests/timeoutPromise.tests.js similarity index 100% rename from web/src/engine/common/web-utils/src/test/timeoutPromise.js rename to web/src/engine/common/web-utils/src/tests/timeoutPromise.tests.js diff --git a/web/src/engine/common/web-utils/src/test/versions.js b/web/src/engine/common/web-utils/src/tests/versions.tests.js similarity index 100% rename from web/src/engine/common/web-utils/src/test/versions.js rename to web/src/engine/common/web-utils/src/tests/versions.tests.js diff --git a/web/src/engine/common/web-utils/tsconfig.json b/web/src/engine/common/web-utils/tsconfig.json index a4d2e57702..1747a62274 100644 --- a/web/src/engine/common/web-utils/tsconfig.json +++ b/web/src/engine/common/web-utils/tsconfig.json @@ -13,6 +13,6 @@ "src/*.ts" ], "exclude": [ - "src/test/**/*.js" + "src/tests/**/*.js" ] } diff --git a/web/src/engine/predictive-text/templates/.c8rc.json b/web/src/engine/predictive-text/templates/.c8rc.json index deaa1318eb..d107a1cacb 100644 --- a/web/src/engine/predictive-text/templates/.c8rc.json +++ b/web/src/engine/predictive-text/templates/.c8rc.json @@ -3,7 +3,7 @@ "clean": true, "exclude": [ "node_modules/**", - "test/**" + "tests/**" ], "exclude-after-remap": true, "reporter": ["text", "text-summary"], diff --git a/web/src/engine/predictive-text/templates/build.sh b/web/src/engine/predictive-text/templates/build.sh index e7aaaac124..bf23622998 100755 --- a/web/src/engine/predictive-text/templates/build.sh +++ b/web/src/engine/predictive-text/templates/build.sh @@ -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 diff --git a/web/src/engine/predictive-text/templates/package.json b/web/src/engine/predictive-text/templates/package.json index c976bcdbe3..7b6604f773 100644 --- a/web/src/engine/predictive-text/templates/package.json +++ b/web/src/engine/predictive-text/templates/package.json @@ -31,7 +31,7 @@ "type": "module", "directories": { - "test": "test" + "test": "tests" }, "files": [ "index.js" diff --git a/web/src/engine/predictive-text/templates/test/test-common.js b/web/src/engine/predictive-text/templates/tests/common.tests.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/test-common.js rename to web/src/engine/predictive-text/templates/tests/common.tests.js diff --git a/web/src/engine/predictive-text/templates/test/custom-breakers.def.js b/web/src/engine/predictive-text/templates/tests/custom-breakers.def.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/custom-breakers.def.js rename to web/src/engine/predictive-text/templates/tests/custom-breakers.def.js diff --git a/web/src/engine/predictive-text/templates/test/fixtures/tries/accented.json b/web/src/engine/predictive-text/templates/tests/fixtures/tries/accented.json similarity index 100% rename from web/src/engine/predictive-text/templates/test/fixtures/tries/accented.json rename to web/src/engine/predictive-text/templates/tests/fixtures/tries/accented.json diff --git a/web/src/engine/predictive-text/templates/test/fixtures/tries/english-1000.json b/web/src/engine/predictive-text/templates/tests/fixtures/tries/english-1000.json similarity index 100% rename from web/src/engine/predictive-text/templates/test/fixtures/tries/english-1000.json rename to web/src/engine/predictive-text/templates/tests/fixtures/tries/english-1000.json diff --git a/web/src/engine/predictive-text/templates/test/fixtures/tries/smp-apple.json b/web/src/engine/predictive-text/templates/tests/fixtures/tries/smp-apple.json similarity index 100% rename from web/src/engine/predictive-text/templates/test/fixtures/tries/smp-apple.json rename to web/src/engine/predictive-text/templates/tests/fixtures/tries/smp-apple.json diff --git a/web/src/engine/predictive-text/templates/test/helpers.js b/web/src/engine/predictive-text/templates/tests/helpers.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/helpers.js rename to web/src/engine/predictive-text/templates/tests/helpers.js diff --git a/web/src/engine/predictive-text/templates/test/test-quote-behavior.js b/web/src/engine/predictive-text/templates/tests/quote-behavior.tests.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/test-quote-behavior.js rename to web/src/engine/predictive-text/templates/tests/quote-behavior.tests.js diff --git a/web/src/engine/predictive-text/templates/test/test-tokenization.js b/web/src/engine/predictive-text/templates/tests/tokenization.tests.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/test-tokenization.js rename to web/src/engine/predictive-text/templates/tests/tokenization.tests.js diff --git a/web/src/engine/predictive-text/templates/test/test-trie-model.js b/web/src/engine/predictive-text/templates/tests/trie-model.tests.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/test-trie-model.js rename to web/src/engine/predictive-text/templates/tests/trie-model.tests.js diff --git a/web/src/engine/predictive-text/templates/test/test-trie-traversal.js b/web/src/engine/predictive-text/templates/tests/trie-traversal.tests.js similarity index 100% rename from web/src/engine/predictive-text/templates/test/test-trie-traversal.js rename to web/src/engine/predictive-text/templates/tests/trie-traversal.tests.js diff --git a/web/src/engine/predictive-text/templates/tsconfig.json b/web/src/engine/predictive-text/templates/tsconfig.json index e8217e9ad9..176530290d 100644 --- a/web/src/engine/predictive-text/templates/tsconfig.json +++ b/web/src/engine/predictive-text/templates/tsconfig.json @@ -16,6 +16,6 @@ "src/**/*.ts" ], "exclude": [ - "test" + "tests" ] } diff --git a/web/src/engine/predictive-text/wordbreakers/.c8rc.json b/web/src/engine/predictive-text/wordbreakers/.c8rc.json index e1de5a5999..6a0e2589da 100644 --- a/web/src/engine/predictive-text/wordbreakers/.c8rc.json +++ b/web/src/engine/predictive-text/wordbreakers/.c8rc.json @@ -3,7 +3,7 @@ "clean": true, "exclude": [ "node_modules/*", - "test" + "tests" ], "exclude-after-remap": true, "reporter": ["text", "text-summary"], diff --git a/web/src/engine/predictive-text/wordbreakers/build.sh b/web/src/engine/predictive-text/wordbreakers/build.sh index 4591cc34e1..6505dfdd4f 100755 --- a/web/src/engine/predictive-text/wordbreakers/build.sh +++ b/web/src/engine/predictive-text/wordbreakers/build.sh @@ -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 diff --git a/web/src/engine/predictive-text/wordbreakers/package.json b/web/src/engine/predictive-text/wordbreakers/package.json index 5ac5fd4a28..89c0469f30 100644 --- a/web/src/engine/predictive-text/wordbreakers/package.json +++ b/web/src/engine/predictive-text/wordbreakers/package.json @@ -34,7 +34,7 @@ }, "directories": { "lib": "lib", - "test": "test" + "test": "tests" }, "files": [ "lib" diff --git a/web/src/engine/predictive-text/wordbreakers/test/test-ascii-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/tests/ascii-word-breaker.tests.js similarity index 100% rename from web/src/engine/predictive-text/wordbreakers/test/test-ascii-word-breaker.js rename to web/src/engine/predictive-text/wordbreakers/tests/ascii-word-breaker.tests.js diff --git a/web/src/engine/predictive-text/wordbreakers/test/test-default-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/tests/default-word-breaker.tests.js similarity index 100% rename from web/src/engine/predictive-text/wordbreakers/test/test-default-word-breaker.js rename to web/src/engine/predictive-text/wordbreakers/tests/default-word-breaker.tests.js diff --git a/web/src/engine/predictive-text/wordbreakers/test/test-placeholder-word-breaker.js b/web/src/engine/predictive-text/wordbreakers/tests/placeholder-word-breaker.tests.js similarity index 100% rename from web/src/engine/predictive-text/wordbreakers/test/test-placeholder-word-breaker.js rename to web/src/engine/predictive-text/wordbreakers/tests/placeholder-word-breaker.tests.js diff --git a/web/src/engine/predictive-text/wordbreakers/test/test-search-property.js b/web/src/engine/predictive-text/wordbreakers/tests/search-property.tests.js similarity index 100% rename from web/src/engine/predictive-text/wordbreakers/test/test-search-property.js rename to web/src/engine/predictive-text/wordbreakers/tests/search-property.tests.js diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.tests.js similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/promise-store.tests.js diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.tests.js similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/top-level-lmlayer.tests.js diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.tests.js similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-dummy-integration.tests.js diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.js b/web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.tests.js similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.js rename to web/src/engine/predictive-text/worker-main/unit_tests/headless/worker-trie-integration.tests.js diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.tests.ts similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/top-level-lmlayer.tests.ts diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.tests.ts similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-dummy-integration.tests.ts diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.spec.ts b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.tests.ts similarity index 100% rename from web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.spec.ts rename to web/src/engine/predictive-text/worker-main/unit_tests/in_browser/cases/worker-trie-integration.tests.ts diff --git a/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs index 6f9df64ddb..e094aebe46 100644 --- a/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs +++ b/web/src/engine/predictive-text/worker-main/unit_tests/in_browser/web-test-runner.config.mjs @@ -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. diff --git a/web/src/engine/predictive-text/worker-thread/.c8rc.json b/web/src/engine/predictive-text/worker-thread/.c8rc.json index 56bc01f350..b66bb5b106 100644 --- a/web/src/engine/predictive-text/worker-thread/.c8rc.json +++ b/web/src/engine/predictive-text/worker-thread/.c8rc.json @@ -2,7 +2,7 @@ "check-coverage": false, "clean": true, "exclude": [ - "src/test/**", + "src/tests/**", "node_modules/*" ], "exclude-after-remap": true, diff --git a/web/src/engine/predictive-text/worker-thread/build.sh b/web/src/engine/predictive-text/worker-thread/build.sh index 05c7326cd0..ddf332e90d 100755 --- a/web/src/engine/predictive-text/worker-thread/build.sh +++ b/web/src/engine/predictive-text/worker-thread/build.sh @@ -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 diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/auto-correct.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/auto-correct.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/auto-correct.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/auto-correct.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/casing-detection.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/casing-detection.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/casing-detection.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/casing-detection.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/early-correction-search-stopping.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/early-correction-search-stopping.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/early-correction-search-stopping.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/early-correction-search-stopping.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/classical-calculation.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/classical-calculation.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/classical-calculation.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/classical-calculation.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/context-tracker.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/context-tracker.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/context-tracker.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/context-tracker.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/distance-modeler.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/distance-modeler.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/distance-modeler.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/distance-modeler.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/execution-timer.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/execution-timer.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/edit-distance/execution-timer.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/edit-distance/execution-timer.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/predict-from-corrections.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/predict-from-corrections.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/predict-from-corrections.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/predict-from-corrections.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-deduplication.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-deduplication.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-deduplication.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-deduplication.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-finalization.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-finalization.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-finalization.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-finalization.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-similarity.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-similarity.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/suggestion-similarity.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/suggestion-similarity.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/transform-tokenization.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/transform-tokenization.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/transform-tokenization.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/transform-tokenization.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/transform-utils.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/transform-utils.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/transform-utils.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/transform-utils.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-custom-punctuation.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-custom-punctuation.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-custom-punctuation.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-custom-punctuation.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-initialization.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-initialization.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-initialization.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-initialization.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-model-compositor.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-model-compositor.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-model-compositor.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-model-compositor.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-predict-dummy.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-predict-dummy.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-predict-dummy.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-predict-dummy.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-predict.js b/web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-predict.js similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/mocha/cases/worker-predict.js rename to web/src/engine/predictive-text/worker-thread/src/tests/mocha/cases/worker-predict.js diff --git a/web/src/engine/predictive-text/worker-thread/src/test/test-runner/cases/worker.spec.ts b/web/src/engine/predictive-text/worker-thread/src/tests/test-runner/cases/worker.tests.ts similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/test-runner/cases/worker.spec.ts rename to web/src/engine/predictive-text/worker-thread/src/tests/test-runner/cases/worker.tests.ts diff --git a/web/src/engine/predictive-text/worker-thread/src/test/test-runner/web-test-runner.CI.config.mjs b/web/src/engine/predictive-text/worker-thread/src/tests/test-runner/web-test-runner.CI.config.mjs similarity index 100% rename from web/src/engine/predictive-text/worker-thread/src/test/test-runner/web-test-runner.CI.config.mjs rename to web/src/engine/predictive-text/worker-thread/src/tests/test-runner/web-test-runner.CI.config.mjs diff --git a/web/src/engine/predictive-text/worker-thread/src/test/test-runner/web-test-runner.config.mjs b/web/src/engine/predictive-text/worker-thread/src/tests/test-runner/web-test-runner.config.mjs similarity index 99% rename from web/src/engine/predictive-text/worker-thread/src/test/test-runner/web-test-runner.config.mjs rename to web/src/engine/predictive-text/worker-thread/src/tests/test-runner/web-test-runner.config.mjs index 920efab464..64ed2763db 100644 --- a/web/src/engine/predictive-text/worker-thread/src/test/test-runner/web-test-runner.config.mjs +++ b/web/src/engine/predictive-text/worker-thread/src/tests/test-runner/web-test-runner.config.mjs @@ -27,7 +27,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. diff --git a/web/src/test/auto/dom/cases/attachment/outputTargetForElement.spec.html b/web/src/test/auto/dom/cases/attachment/outputTargetForElement.tests.html similarity index 100% rename from web/src/test/auto/dom/cases/attachment/outputTargetForElement.spec.html rename to web/src/test/auto/dom/cases/attachment/outputTargetForElement.tests.html diff --git a/web/src/test/auto/dom/cases/attachment/pageContextAttachment.spec.ts b/web/src/test/auto/dom/cases/attachment/pageContextAttachment.test.ts similarity index 100% rename from web/src/test/auto/dom/cases/attachment/pageContextAttachment.spec.ts rename to web/src/test/auto/dom/cases/attachment/pageContextAttachment.test.ts diff --git a/web/src/test/auto/dom/cases/browser/contextManager.spec.ts b/web/src/test/auto/dom/cases/browser/contextManager.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/browser/contextManager.spec.ts rename to web/src/test/auto/dom/cases/browser/contextManager.tests.ts diff --git a/web/src/test/auto/dom/cases/dom-utils/cookies.spec.ts b/web/src/test/auto/dom/cases/dom-utils/cookies.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/dom-utils/cookies.spec.ts rename to web/src/test/auto/dom/cases/dom-utils/cookies.tests.ts diff --git a/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts b/web/src/test/auto/dom/cases/element-wrappers/element_interfaces.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/element-wrappers/element_interfaces.spec.ts rename to web/src/test/auto/dom/cases/element-wrappers/element_interfaces.tests.ts diff --git a/web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts b/web/src/test/auto/dom/cases/element-wrappers/target_mocks.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/element-wrappers/target_mocks.spec.ts rename to web/src/test/auto/dom/cases/element-wrappers/target_mocks.tests.ts diff --git a/web/src/test/auto/dom/cases/gesture-processor/canary.spec.ts b/web/src/test/auto/dom/cases/gesture-processor/canary.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/gesture-processor/canary.spec.ts rename to web/src/test/auto/dom/cases/gesture-processor/canary.tests.ts diff --git a/web/src/test/auto/dom/cases/gesture-processor/host-page.spec.html b/web/src/test/auto/dom/cases/gesture-processor/host-page.tests.html similarity index 92% rename from web/src/test/auto/dom/cases/gesture-processor/host-page.spec.html rename to web/src/test/auto/dom/cases/gesture-processor/host-page.tests.html index ce3aae6c48..cc83c5e6ef 100644 --- a/web/src/test/auto/dom/cases/gesture-processor/host-page.spec.html +++ b/web/src/test/auto/dom/cases/gesture-processor/host-page.tests.html @@ -18,9 +18,9 @@ import { runTests } from '@web/test-runner-mocha'; runTests(async() => { - await import('./canary.spec.ts'); - await import('./ignoredInputs.spec.ts'); - await import('./recordedCoordSequences.spec.ts'); + await import('./canary.tests.ts'); + await import('./ignoredInputs.tests.ts'); + await import('./recordedCoordSequences.tests.ts'); }); diff --git a/web/src/test/auto/dom/cases/gesture-processor/ignoredInputs.spec.ts b/web/src/test/auto/dom/cases/gesture-processor/ignoredInputs.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/gesture-processor/ignoredInputs.spec.ts rename to web/src/test/auto/dom/cases/gesture-processor/ignoredInputs.tests.ts diff --git a/web/src/test/auto/dom/cases/gesture-processor/recordedCoordSequences.spec.ts b/web/src/test/auto/dom/cases/gesture-processor/recordedCoordSequences.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/gesture-processor/recordedCoordSequences.spec.ts rename to web/src/test/auto/dom/cases/gesture-processor/recordedCoordSequences.tests.ts diff --git a/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/cloudQueries.tests.ts diff --git a/web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/domCloudRequester.tests.ts diff --git a/web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.spec.ts b/web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.spec.ts rename to web/src/test/auto/dom/cases/keyboard-storage/keyboardRequisitioner.tests.ts diff --git a/web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.spec.ts b/web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.spec.ts rename to web/src/test/auto/dom/cases/keyboard/domKeyboardLoader.tests.ts diff --git a/web/src/test/auto/dom/cases/osk/activation.spec.ts b/web/src/test/auto/dom/cases/osk/activation.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/osk/activation.spec.ts rename to web/src/test/auto/dom/cases/osk/activation.tests.ts diff --git a/web/src/test/auto/dom/cases/osk/events.spec.ts b/web/src/test/auto/dom/cases/osk/events.tests.ts similarity index 100% rename from web/src/test/auto/dom/cases/osk/events.spec.ts rename to web/src/test/auto/dom/cases/osk/events.tests.ts diff --git a/web/src/test/auto/dom/test_init_check.spec.ts b/web/src/test/auto/dom/init_check.tests.ts similarity index 100% rename from web/src/test/auto/dom/test_init_check.spec.ts rename to web/src/test/auto/dom/init_check.tests.ts diff --git a/web/src/test/auto/dom/web-test-runner.config.mjs b/web/src/test/auto/dom/web-test-runner.config.mjs index 3050837cd5..701eab15a7 100644 --- a/web/src/test/auto/dom/web-test-runner.config.mjs +++ b/web/src/test/auto/dom/web-test-runner.config.mjs @@ -33,53 +33,53 @@ export default { nodeResolve: true, // Top-level, implicit 'default' group files: [ - 'src/test/auto/dom/test_init_check.spec.ts', - // '**/*.spec.html' + 'src/test/auto/dom/init_check.tests.ts', + // '**/*.tests.html' ], groups: [ { name: 'engine/attachment', // Relative, from the containing package.json files: [ - 'build/test/dom/cases/attachment/**/*.spec.html', - 'build/test/dom/cases/attachment/**/*.spec.mjs' + 'build/test/dom/cases/attachment/**/*.tests.html', + 'build/test/dom/cases/attachment/**/*.tests.mjs' ] }, { name: 'app/browser', // Relative, from the containing package.json - files: ['build/test/dom/cases/browser/**/*.spec.mjs'] + files: ['build/test/dom/cases/browser/**/*.tests.mjs'] }, { name: 'engine/dom-utils', // Relative, from the containing package.json - files: ['build/test/dom/cases/dom-utils/**/*.spec.mjs'] + files: ['build/test/dom/cases/dom-utils/**/*.tests.mjs'] }, { name: 'engine/element-wrappers', // Relative, from the containing package.json - files: ['build/test/dom/cases/element-wrappers/**/*.spec.mjs'] + files: ['build/test/dom/cases/element-wrappers/**/*.tests.mjs'] }, { name: 'engine/gesture-processor', // Relative, from the containing package.json - // Note: here we use the .spec.html file in the src directory! - files: ['src/test/auto/dom/cases/gesture-processor/**/*.spec.html'] + // Note: here we use the .tests.html file in the src directory! + files: ['src/test/auto/dom/cases/gesture-processor/**/*.tests.html'] }, { name: 'engine/keyboard', // Relative, from the containing package.json - files: ['build/test/dom/cases/keyboard/**/*.spec.mjs'] + files: ['build/test/dom/cases/keyboard/**/*.tests.mjs'] }, { name: 'engine/keyboard-storage', // Relative, from the containing package.json - files: ['build/test/dom/cases/keyboard-storage/**/*.spec.mjs'] + files: ['build/test/dom/cases/keyboard-storage/**/*.tests.mjs'] }, { name: 'engine/osk', // Relative, from the containing package.json - files: ['build/test/dom/cases/osk/**/*.spec.mjs'] + files: ['build/test/dom/cases/osk/**/*.tests.mjs'] } ], middleware: [ diff --git a/web/src/test/auto/headless/engine/events/emitterListenerSpy.js b/web/src/test/auto/headless/engine/events/emitterListenerSpy.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/events/emitterListenerSpy.js rename to web/src/test/auto/headless/engine/events/emitterListenerSpy.tests.js diff --git a/web/src/test/auto/headless/engine/events/legacyEventEmitter.js b/web/src/test/auto/headless/engine/events/legacyEventEmitter.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/events/legacyEventEmitter.js rename to web/src/test/auto/headless/engine/events/legacyEventEmitter.tests.js diff --git a/web/src/test/auto/headless/engine/interfaces/pathConfiguration.js b/web/src/test/auto/headless/engine/interfaces/pathConfiguration.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/interfaces/pathConfiguration.js rename to web/src/test/auto/headless/engine/interfaces/pathConfiguration.tests.js diff --git a/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js b/web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.spec.js rename to web/src/test/auto/headless/engine/interfaces/prediction/predictionContext.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/basic-engine.js b/web/src/test/auto/headless/engine/js-processor/basic-engine.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/basic-engine.js rename to web/src/test/auto/headless/engine/js-processor/basic-engine.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/basic-init.js b/web/src/test/auto/headless/engine/js-processor/basic-init.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/basic-init.js rename to web/src/test/auto/headless/engine/js-processor/basic-init.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/bundled-module.js b/web/src/test/auto/headless/engine/js-processor/bundled-module.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/bundled-module.js rename to web/src/test/auto/headless/engine/js-processor/bundled-module.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/chirality.js b/web/src/test/auto/headless/engine/js-processor/chirality.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/chirality.js rename to web/src/test/auto/headless/engine/js-processor/chirality.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/deadkeys.js b/web/src/test/auto/headless/engine/js-processor/deadkeys.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/deadkeys.js rename to web/src/test/auto/headless/engine/js-processor/deadkeys.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/engine/context.js b/web/src/test/auto/headless/engine/js-processor/engine/context.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/engine/context.js rename to web/src/test/auto/headless/engine/js-processor/engine/context.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/engine/notany_context.js b/web/src/test/auto/headless/engine/js-processor/engine/notany_context.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/engine/notany_context.js rename to web/src/test/auto/headless/engine/js-processor/engine/notany_context.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/engine/stores.js b/web/src/test/auto/headless/engine/js-processor/engine/stores.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/engine/stores.js rename to web/src/test/auto/headless/engine/js-processor/engine/stores.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.js b/web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.js rename to web/src/test/auto/headless/engine/js-processor/engine/unmatched_final_group.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/mocks.js b/web/src/test/auto/headless/engine/js-processor/mocks.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/mocks.js rename to web/src/test/auto/headless/engine/js-processor/mocks.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/non-positional-rules.js b/web/src/test/auto/headless/engine/js-processor/non-positional-rules.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/non-positional-rules.js rename to web/src/test/auto/headless/engine/js-processor/non-positional-rules.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/specialized-backspace.js b/web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/specialized-backspace.js rename to web/src/test/auto/headless/engine/js-processor/specialized-backspace.tests.js diff --git a/web/src/test/auto/headless/engine/js-processor/transcriptions.js b/web/src/test/auto/headless/engine/js-processor/transcriptions.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/js-processor/transcriptions.js rename to web/src/test/auto/headless/engine/js-processor/transcriptions.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.js b/web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.js rename to web/src/test/auto/headless/engine/keyboard-storage/cloudQueries.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js b/web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.js rename to web/src/test/auto/headless/engine/keyboard-storage/keyboardRequisitioner.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.js b/web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.js rename to web/src/test/auto/headless/engine/keyboard-storage/keyboardStub.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.js b/web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.js rename to web/src/test/auto/headless/engine/keyboard-storage/nodeCloudRequester.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.js b/web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.js rename to web/src/test/auto/headless/engine/keyboard-storage/stubAndKeyboardCache.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard/keyboard-loading.js b/web/src/test/auto/headless/engine/keyboard/keyboard-loading.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard/keyboard-loading.js rename to web/src/test/auto/headless/engine/keyboard/keyboard-loading.tests.js diff --git a/web/src/test/auto/headless/engine/keyboard/keyboard-properties.js b/web/src/test/auto/headless/engine/keyboard/keyboard-properties.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/keyboard/keyboard-properties.js rename to web/src/test/auto/headless/engine/keyboard/keyboard-properties.tests.js diff --git a/web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js b/web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/main/headless/inputProcessor.spec.js rename to web/src/test/auto/headless/engine/main/headless/inputProcessor.tests.js diff --git a/web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js b/web/src/test/auto/headless/engine/main/headless/languageProcessor.tests.js similarity index 100% rename from web/src/test/auto/headless/engine/main/headless/languageProcessor.spec.js rename to web/src/test/auto/headless/engine/main/headless/languageProcessor.tests.js diff --git a/web/src/test/auto/integrated/cases/basics.spec.ts b/web/src/test/auto/integrated/cases/basics.tests.ts similarity index 100% rename from web/src/test/auto/integrated/cases/basics.spec.ts rename to web/src/test/auto/integrated/cases/basics.tests.ts diff --git a/web/src/test/auto/integrated/cases/engine.spec.ts b/web/src/test/auto/integrated/cases/engine.tests.ts similarity index 100% rename from web/src/test/auto/integrated/cases/engine.spec.ts rename to web/src/test/auto/integrated/cases/engine.tests.ts diff --git a/web/src/test/auto/integrated/cases/engine_chirality.spec.ts b/web/src/test/auto/integrated/cases/engine_chirality.tests.ts similarity index 100% rename from web/src/test/auto/integrated/cases/engine_chirality.spec.ts rename to web/src/test/auto/integrated/cases/engine_chirality.tests.ts diff --git a/web/src/test/auto/integrated/cases/events.spec.ts b/web/src/test/auto/integrated/cases/events.tests.ts similarity index 100% rename from web/src/test/auto/integrated/cases/events.spec.ts rename to web/src/test/auto/integrated/cases/events.tests.ts diff --git a/web/src/test/auto/integrated/cases/text_selection.spec.ts b/web/src/test/auto/integrated/cases/text_selection.tests.ts similarity index 100% rename from web/src/test/auto/integrated/cases/text_selection.spec.ts rename to web/src/test/auto/integrated/cases/text_selection.tests.ts diff --git a/web/src/test/auto/integrated/test_init_check.spec.ts b/web/src/test/auto/integrated/init_check.tests.ts similarity index 100% rename from web/src/test/auto/integrated/test_init_check.spec.ts rename to web/src/test/auto/integrated/init_check.tests.ts diff --git a/web/src/test/auto/integrated/web-test-runner.config.mjs b/web/src/test/auto/integrated/web-test-runner.config.mjs index 1637ea82d6..8d937f55af 100644 --- a/web/src/test/auto/integrated/web-test-runner.config.mjs +++ b/web/src/test/auto/integrated/web-test-runner.config.mjs @@ -17,15 +17,15 @@ export default { new LauncherWrapper(playwrightLauncher({ product: 'firefox' })), // Setting it higher makes things faster... but Webkit experiences stability // issues for some of the tests if this is set higher than 1. Notably, - // engine.spec.mjs, events.spec.mjs, and text_selection.spec.mjs. All the + // engine.tests.mjs, events.tests.mjs, and text_selection.tests.mjs. All the // text-simulation ones. new LauncherWrapper(playwrightLauncher({ product: 'webkit', concurrency: 1})) ], concurrency: 10, nodeResolve: true, files: [ - 'build/test/integrated//**/*.spec.mjs', - // '**/*.spec.html' + 'build/test/integrated//**/*.tests.mjs', + // '**/*.tests.html' ], middleware: [ // Rewrites short-hand paths for test resources, making them fully relative to the repo root.