Skip to content

chore(test): set up Vitest test infrastructure for web/ #195

Closed

Description

@gkhngyk

Summary

The project currently has no automated tests — no test runner, no test
script, and no test files anywhere. This issue sets up the testing foundation
for the web/ package so that future tests have somewhere to live and run.

Once this lands, writing tests for individual pure functions becomes a series of
small, safe follow-ups (see the linked CSV test issue below).

What to do

Set up Vitest in the web/ package (the natural fit for a Next.js 16 +
TypeScript project using Yarn — ESM-native, fast, minimal config):

  1. Add vitest (and any small config it needs) as a dev dependency in
    web/package.json.
  2. Add a test script (e.g. "test": "vitest run", and optionally
    "test:watch": "vitest").
  3. Add minimal Vitest config so the @/ path alias used across the app resolves
    in tests (matching the existing tsconfig paths).
  4. Include one trivial smoke test that proves the setup runs (a single
    expect(true).toBe(true) style test is fine — the real coverage comes in the
    follow-up issues).
  5. Wire a test step into CI — add it to the existing
    web — format, lint & typecheck workflow (or a parallel job) so tests run on
    every PR. A test suite that isn't run in CI rots.

Acceptance

  • cd web && yarn test runs Vitest and the smoke test passes.
  • The @/ alias resolves in test files.
  • CI runs the test step on pull requests.
  • No application code changes — this is purely test infrastructure.

Notes

Please stick to Vitest rather than introducing Jest or another runner, so we
don't end up with competing setups. Keep the config as small as possible.

Activity

  1. added
    enhancement
    good first issue
    on Jun 8, 2026
  2. gkhngyk commented on Jun 8, 2026

    @gkhngyk
    ContributorAuthor

    Part of the test-infrastructure epic #125 — this is the foundational web/ slice that unblocks #196 and #198.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions