Skip to content

Run test coverage on CLI package #1331

@jescalada

Description

@jescalada

During the Vitest test refactor in #1202, I wasn't able to get CLI test coverage to work correctly, mostly due to problems with the native vitest --coverage command's package resolution. Instead of calculating the coverage % on the CLI files only, it would run the CLI tests and calculate coverage on the entire backend + CLI files. This resulted in abysmal coverage and a failing CI, since it expects to have 80%+ overall coverage.

I experimented with adding a Vitest config file for the CLI only, but I wasn't able to exclude the backend files.

We should figure out the way to calculate coverage for the CLI files correctly and incorporate them to the CI to enforce 80%+ CLI coverage as well.

Additional context
Comment in Vitest refactor PR: #1202 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions