Skip to content

Run the frontend tests in CI - #111

Open
an0nn30 wants to merge 1 commit into
mainfrom
chore/ci-run-js-tests
Open

Run the frontend tests in CI#111
an0nn30 wants to merge 1 commit into
mainfrom
chore/ci-run-js-tests

Conversation

@an0nn30

@an0nn30 an0nn30 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

The gap

ci.yml defined four jobs — lint, ubuntu, macos, windows — and none of them touch npm or Node. So the vitest suite added alongside the plugin HTML sanitizer in #107 exists, passes locally, and is invisible to CI.

That matters more than a normal coverage gap: those 57 tests cover the sanitizer and icon-name validation, which are what stand between an untrusted plugin and window.__TAURI__.invoke. A regression in either would have reached main with every check green.

It is also the harness the v2 render-loop reconciler is meant to be tested with, so it only gets more load-bearing from here.

The change

One new job, Frontend tests: checkout, setup-node@v4 (Node 22, npm cache), npm ci, npm test. Placed after lint so the fast jobs stay grouped ahead of the three platform builds.

Verification

Run the way CI will run it — node_modules wiped, clean npm ci from the committed lockfile, then npm test:

Test Files  2 passed (2)
     Tests  57 passed (57)

The workflow YAML was also parsed to confirm it is valid and now defines five jobs rather than four.

Note the job could not be exercised before this PR: ci.yml triggers only on push to main and pull_request to main, so pushing the branch alone runs nothing. This PR is the first time it actually executes — worth confirming it goes green here rather than trusting the local run.

🤖 Generated with Claude Code

ci.yml defined lint, ubuntu, macos and windows, none of which touch npm —
so the vitest suite added with the plugin HTML sanitizer existed, passed
locally, and was invisible to CI. A regression in the sanitizer or in icon
name validation would have reached main unnoticed, and both stand between
an untrusted plugin and the Tauri bridge.

Verified locally with a clean npm ci from the lockfile: 57 tests pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant