keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
367 stars 102 forks source link

chore(web): working branch - replacement of Karma with Web Test Runner 🏃 #11300

Open jahorton opened 1 week ago

jahorton commented 1 week ago

Seeks to address #10497. That said, we're going to want to break this into multiple pieces.

So far, I've managed to get one test file up and running in Web Test Runner. There were a number of side issues, so I considered that "good enough" to merit a priority shift - there are other changes needed to make it compatible with our current setup.

Current planned future branch-split for separate PRs:

  1. npm install for all relevant packages - to get the package-lock.json out of the way of further reviewing & prevent it from affecting future change's changelog size
  2. First actual test
  3. The prototype teamcity-reporter module, for proper test-result reports
    • May involve rewriting it in TS
    • And/or writing it as a wholly separate package; it's small-scope yet could prove useful to a wider range of folks.
  4. Prototype tests as TS -> tsc compile -> link in compiled JS for .spec.html pages. Figure out a solid pattern before we need it.
    • Alternatively... maybe just use jsdoc syntax? It's "different", to be sure, but it's possible to do type-imports, and VS Code seems able to figure out typing from there.
  5. Start converting individual subproject Karma tests over to the new testing engine.
keymanapp-test-bot[bot] commented 1 week ago

User Test Results

Test specification and instructions

ERROR: user tests have not yet been defined

Test Artifacts

jahorton commented 5 days ago

The latest build has a successfully-passing "Test: Language Modeling Layer (Common)" run, which includes new Web Test Runner tests. The custom TC-oriented reporter appears to be working properly; its tests are showing up properly in the "Tests Passed" list.

jahorton commented 4 days ago

Re: Web - something fell over with the WebKit test run within common/web/keyboard-processor. Will have to inspect that.

... I should consider taking the time to investigate ways to get better data about mysterious errors like this; we have our own custom TC reporter now, so surely we can get something more useful in this scenario... with a little effort.