Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.
This repository was archived by the owner on Aug 7, 2026. It is now read-only.

ci: run vitest test suite in build workflow #126

Description

@dobby-coder

The vitest suite (10 test files, 156 passing tests at HEAD) is not executed in CI. .github/workflows/build.yml runs only npm run typecheck and npm run build. As a result, a PR that breaks the unit tests can pass CI green.

Reproduction

$ grep -n "test\|vitest" .github/workflows/build.yml
# (no `npm test` step)

npm test works locally:

$ npm test
 Test Files  10 passed (10)
      Tests  156 passed (156)
   Duration  ~700ms

Fix

Add a step in the build job, between Type check and Build extension:

- name: Run tests
  run: npm test

The tests are pure (no network, browser API is mocked via tests/helpers/browser-mock.ts) and finish in well under a second, so this is essentially free.

Why now

The recent test-extraction work (PRs #110-#117) produced a substantial suite. PR #105 tracked the previous "108 it.todo placeholders" problem and is now closed because the placeholders have been replaced by real assertions. Pinning that suite in CI is the natural follow-up.

Acceptance criteria

  • .github/workflows/build.yml runs npm test before the build/package steps.
  • A PR that intentionally breaks one test fails the build job.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions