ci: Add npm test script and integrate frontend test suites into CI workflows #215

Closed
opened 2026-09-06 12:35:33 +01:00 by gronod · 1 comment
Owner

Summary

The frontend unit test suites (src/js/profcheck.test.js, src/js/chartread.test.js, src/js/gamut_viewer.test.js) lack an entry in package.json and are not executed in Gitea CI workflows (.gitea/workflows/).

Details

  1. In package.json:
    "scripts": {
      "fetch-argyll": "node scripts/fetch-argyll.mjs",
      "tauri": "tauri"
    }
    
    No "test" script is defined. Running npm test fails with npm error Missing script: "test".
  2. In .gitea/workflows/build-macos.yml, build-linux.yml, and build-windows.yml, only backend Rust tests (cargo test) are executed. As a consequence, regression bugs in JavaScript report parsing (e.g. Argyll -u JSON summaries), XY scanning table state transitions, or breach alert calculation are not caught in CI prior to packaging releases.

Proposed Remediation

  1. Add a "test" script to package.json that executes the test suites:
    "test": "node src/js/profcheck.test.js && node src/js/chartread.test.js && node src/js/gamut_viewer.test.js"
    
  2. Add a Run frontend tests step (npm test) in .gitea/workflows/build-macos.yml, build-linux.yml, and build-windows.yml preceding the app packaging step.
### Summary The frontend unit test suites (`src/js/profcheck.test.js`, `src/js/chartread.test.js`, `src/js/gamut_viewer.test.js`) lack an entry in `package.json` and are not executed in Gitea CI workflows (`.gitea/workflows/`). ### Details 1. In `package.json`: ```json "scripts": { "fetch-argyll": "node scripts/fetch-argyll.mjs", "tauri": "tauri" } ``` No `"test"` script is defined. Running `npm test` fails with `npm error Missing script: "test"`. 2. In `.gitea/workflows/build-macos.yml`, `build-linux.yml`, and `build-windows.yml`, only backend Rust tests (`cargo test`) are executed. As a consequence, regression bugs in JavaScript report parsing (e.g. Argyll `-u` JSON summaries), XY scanning table state transitions, or breach alert calculation are not caught in CI prior to packaging releases. ### Proposed Remediation 1. Add a `"test"` script to `package.json` that executes the test suites: ```json "test": "node src/js/profcheck.test.js && node src/js/chartread.test.js && node src/js/gamut_viewer.test.js" ``` 2. Add a `Run frontend tests` step (`npm test`) in `.gitea/workflows/build-macos.yml`, `build-linux.yml`, and `build-windows.yml` preceding the app packaging step.
gronod added the Kind/EnhancementKind/Testing
Priority
Low
4
labels 2026-09-06 12:35:33 +01:00
Author
Owner

Resolved in ci/215-frontend-tests (commit 906b4f9) and merged into development (commit 56f275a).

  • Added "test" script to package.json executing node src/js/profcheck.test.js && node src/js/chartread.test.js && node src/js/gamut_viewer.test.js (68 automated test cases).
  • Integrated Run frontend tests (npm test) step into .gitea/workflows/build-macos.yml, .gitea/workflows/build-linux.yml, and .gitea/workflows/build-windows.yml immediately following npm ci.
Resolved in `ci/215-frontend-tests` (commit `906b4f9`) and merged into `development` (commit `56f275a`). - Added `"test"` script to `package.json` executing `node src/js/profcheck.test.js && node src/js/chartread.test.js && node src/js/gamut_viewer.test.js` (68 automated test cases). - Integrated `Run frontend tests` (`npm test`) step into `.gitea/workflows/build-macos.yml`, `.gitea/workflows/build-linux.yml`, and `.gitea/workflows/build-windows.yml` immediately following `npm ci`.
Sign in to join this conversation.