Skip to content

Adopt Vitest for TypeScript tests and run them in pull request CI #21

Description

@ho991217

Context

yarn test currently builds the package and runs node:test files against dist.
The existing tests work, but there is no pull request workflow that runs them.

As more CODEOWNERS and CLI regressions are covered, testing TypeScript source directly would make the suite easier to develop.

Proposed work

  • Add Vitest and its required Vite dependency.
  • Migrate the existing CODEOWNERS tests to Vitest without losing their assertions.
  • Make yarn test run the suite once and return a failing exit code when a test fails.
  • Add a pull request workflow that installs dependencies with yarn install --immutable and runs yarn test, yarn typecheck, and yarn build.

Acceptance criteria

  • yarn test passes from a clean checkout without prebuilt dist files.
  • The existing CODEOWNERS regression test, and the additional cases in PR fix: group CODEOWNERS by directory and resolve paths from root #16 once merged, run under Vitest.
  • A failing test produces a failed check on a pull request.
  • The package build is still verified separately, since source-level tests no longer exercise the built output.

Activity

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions