Add Vitest test runner to westside-landing #247
Labels
No labels
domain:backend
domain:devops
domain:frontend
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/westside-app#247
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Discovered 2026-04-10 during
westside-landing#243(T1 of System B jersey intake). The T1 dev agent could not satisfy itsTest Expectationsacceptance criteria because westside-landing has no test runner configured —package.jsonscripts are onlydev,build,preview,check. Vitest is the standard SvelteKit test runner and is trivial to add, but warrants its own ticket.Repo
forgejo_admin/westside-landingUser Story
As a dev agent building SvelteKit features in westside-landing
I want a working
npm run testcommand backed by VitestSo that ticket acceptance criteria that specify component/unit tests can actually be satisfied, and so new code lands with test coverage rather than only manual verification
Context
westside-landing is a production SvelteKit app deployed to
westsidekingsandqueens.tail5b443a.ts.net. Multiple in-flight tickets (T1 #243, T6 #244) specify Svelte component tests in their Test Expectations. Without Vitest these ACs are unenforceable and the agents have to flag them as deferred.Vitest is the Svelte-recommended runner and integrates with SvelteKit via
vitest+@testing-library/svelte+ a minimalvitest.config.ts. No build system changes required.File Targets
Files to create:
vitest.config.ts— minimal config importing the SvelteKit vite pluginsrc/setupTests.ts— optional, adds@testing-library/jest-dommatchersFiles to modify:
package.json— addtestandtest:watchscripts; addvitest,@testing-library/svelte,@testing-library/jest-dom,jsdomto devDependenciesFiles the agent should NOT touch:
src/component or route — this ticket is infrastructure onlysvelte.config.js— should not need changesAcceptance Criteria
npm run testruns Vitest and exits 0 with "No tests found" (or equivalent) on a fresh checkoutnpm run test:watchstarts Vitest in watch modetests/smoke.test.tswithexpect(1+1).toBe(2)) runs green@testing-library/svelterenders a hello-world component and asserts on its textnpm run buildstill succeeds (no regression)npm run checkstill passes (no new type errors)Test Expectations
npm run test— must exit 0Constraints
^ranges) to avoid surprise breakageChecklist
westside-landingmainnpm installruns cleanly in a fresh clonenpm run testpassesnpm run buildstill passesRelated
westside-basketball— projectstory:WS-S31— this story's existing tickets (T1 #243, T6 #244) block on not being able to write the tests they specwestside-landing#243dev agent on 2026-04-10