Skip to content

Daily Test Coverage Improver - Fix Vitest 4 Coverage Command#7981

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test/fix-coverage-steps-vitest-4-d091b30db70e065f
Draft

Daily Test Coverage Improver - Fix Vitest 4 Coverage Command#7981
github-actions[bot] wants to merge 1 commit into
mainfrom
test/fix-coverage-steps-vitest-4-d091b30db70e065f

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Fixes the coverage-steps action.yml to work with Vitest 4 by removing the deprecated --coverageDirectory flag.

Problem

The coverage steps were failing with:

CACError: Unknown option `--coverageDirectory`

This is because Vitest 4 removed support for the --coverageDirectory CLI flag. The coverage directory should be configured in vitest.config.ts instead (which it already is).

Changes

  • Removed --coverageDirectory=coverage flag from React test command
  • Removed --coverageDirectory=coverage flag from backend.ai-ui test command
  • Coverage directory is already properly configured in both react/vitest.config.ts and packages/backend.ai-ui/vitest.config.ts via reportsDirectory: 'coverage'

Testing

Successfully ran both test suites with coverage:

React Project

  • Statements: 5.33%
  • Branches: 3.59%
  • Functions: 5.32%
  • Lines: 6.48%

backend.ai-ui Project

  • Statements: 9.23%
  • Branches: 7.71%
  • Functions: 12.04%
  • Lines: 10.94%

Reproducibility

# Install dependencies (skip electron which has network issues)
pnpm install --frozen-lockfile --ignore-scripts

# Run React tests with coverage
cd react && pnpm run test --coverage

# Run backend.ai-ui tests with coverage
cd packages/backend.ai-ui && pnpm run test --coverage

Coverage reports are generated at:

  • react/coverage/index.html
  • packages/backend.ai-ui/coverage/index.html

What Happens Next

Once this PR is merged, the next workflow run can proceed with Phase 3, where actual test coverage improvements will be implemented systematically using the working coverage steps.

AI generated by Daily Test Coverage Improver

…ommands

Vitest 4 no longer supports the --coverageDirectory CLI flag.
Coverage directory is configured in vitest.config.ts files instead.

Changes:
- Remove --coverageDirectory=coverage flag from React test command
- Remove --coverageDirectory=coverage flag from backend.ai-ui test command
- Coverage directory already set in vitest.config.ts (reportsDirectory: 'coverage')

Tested:
- React coverage: 5.33% stmt | 3.59% branch | 5.32% func | 6.48% lines
- backend.ai-ui: 9.23% stmt | 7.71% branch | 12.04% func | 10.94% lines

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@cla-assistant

cla-assistant Bot commented Jun 19, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Jun 19, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant