Skip to content

Commit

Permalink
Merge pull request #12559 from keymanapp/refactor/core/tests
Browse files Browse the repository at this point in the history
feat(core): run tests from `KEYMAN_ROOT` instead of `web` 🎼
  • Loading branch information
ermshiperete authored Nov 4, 2024
2 parents eef6ea9 + 0d86bbd commit 208b942
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
22 changes: 11 additions & 11 deletions web/src/test/auto/dom/web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,58 +33,58 @@ export default {
nodeResolve: true,
// Top-level, implicit 'default' group
files: [
'src/test/auto/dom/test_init_check.spec.ts',
'web/src/test/auto/dom/test_init_check.spec.ts',
// '**/*.spec.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'
'web/build/test/dom/cases/attachment/**/*.spec.html',
'web/build/test/dom/cases/attachment/**/*.spec.mjs'
]
},
{
name: 'app/browser',
// Relative, from the containing package.json
files: ['build/test/dom/cases/browser/**/*.spec.mjs']
files: ['web/build/test/dom/cases/browser/**/*.spec.mjs']
},
{
name: 'engine/core-processor',
// Relative, from the containing package.json
files: ['build/test/dom/cases/core-processor/**/*.spec.mjs']
files: ['web/src/test/auto/dom/cases/core-processor/*.spec.ts']
},
{
name: 'engine/dom-utils',
// Relative, from the containing package.json
files: ['build/test/dom/cases/dom-utils/**/*.spec.mjs']
files: ['web/build/test/dom/cases/dom-utils/**/*.spec.mjs']
},
{
name: 'engine/element-wrappers',
// Relative, from the containing package.json
files: ['build/test/dom/cases/element-wrappers/**/*.spec.mjs']
files: ['web/build/test/dom/cases/element-wrappers/**/*.spec.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']
files: ['web/src/test/auto/dom/cases/gesture-processor/**/*.spec.html']
},
{
name: 'engine/keyboard',
// Relative, from the containing package.json
files: ['build/test/dom/cases/keyboard/**/*.tests.mjs']
files: ['web/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: ['web/build/test/dom/cases/keyboard-storage/**/*.spec.mjs']
},
{
name: 'engine/osk',
// Relative, from the containing package.json
files: ['build/test/dom/cases/osk/**/*.spec.mjs']
files: ['web/build/test/dom/cases/osk/**/*.spec.mjs']
}
],
middleware: [
Expand Down
2 changes: 1 addition & 1 deletion web/src/test/auto/integrated/web-test-runner.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
concurrency: 10,
nodeResolve: true,
files: [
'build/test/integrated//**/*.spec.mjs',
'web/build/test/integrated//**/*.spec.mjs',
// '**/*.spec.html'
],
middleware: [
Expand Down
6 changes: 4 additions & 2 deletions web/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ fi

# End common configs.

builder_run_action test:dom web-test-runner --config "src/test/auto/dom/web-test-runner${WTR_CONFIG}.config.mjs" ${WTR_DEBUG}
cd "${KEYMAN_ROOT}"

builder_run_action test:integrated web-test-runner --config "src/test/auto/integrated/web-test-runner${WTR_CONFIG}.config.mjs" ${WTR_DEBUG}
builder_run_action test:dom web-test-runner --config "web/src/test/auto/dom/web-test-runner${WTR_CONFIG}.config.mjs" ${WTR_DEBUG}

builder_run_action test:integrated web-test-runner --config "web/src/test/auto/integrated/web-test-runner${WTR_CONFIG}.config.mjs" ${WTR_DEBUG}

0 comments on commit 208b942

Please sign in to comment.