Run the frontend tests in CI - #111
Open
an0nn30 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gap
ci.ymldefined 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 reachedmainwith 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 afterlintso the fast jobs stay grouped ahead of the three platform builds.Verification
Run the way CI will run it —
node_moduleswiped, cleannpm cifrom the committed lockfile, thennpm test: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.ymltriggers only onpushtomainandpull_requesttomain, 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