Skip to content

Daily Test Coverage Improver - Fix Vitest 4 Compatibility#7889

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test/fix-coverage-steps-vitest4-compatibility-7a894a8bf0f80e63
Draft

Daily Test Coverage Improver - Fix Vitest 4 Compatibility#7889
github-actions[bot] wants to merge 1 commit into
mainfrom
test/fix-coverage-steps-vitest4-compatibility-7a894a8bf0f80e63

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Overview

Fixes the coverage steps action to work with Vitest 4 by removing the unsupported --coverageDirectory command-line flag.

Problem

The coverage steps in .github/actions/daily-test-improver/coverage-steps/action.yml were failing with:

CACError: Unknown option `--coverageDirectory`

Vitest 4 removed support for this command-line flag. The coverage directory is already configured in vitest.config.ts files via the coverage.reportsDirectory option.

Solution

Removed the --coverageDirectory=coverage flag from both test commands:

  • React tests: pnpm run test --coverage --coverageDirectory=coveragepnpm run test --coverage
  • backend.ai-ui tests: Same change

Validation

Manually tested both test suites:

React Project:

  • Test Files: 42 passed (42)
  • Tests: 895 passed (895)
  • Coverage: 5.49% statements, 3.7% branch, 5.36% functions
  • Coverage reports generated successfully at react/coverage/

backend.ai-ui Project:

  • Test Files: 16 passed | 1 skipped (17)
  • Tests: 348 passed | 1 skipped (349)
  • Coverage: 9.48% statements, 7.88% branch, 12.38% functions
  • Coverage reports generated successfully at packages/backend.ai-ui/coverage/

What Happens Next

Once this PR is merged, the Daily Test Coverage Improver workflow will be able to proceed to Phase 3, where it will systematically improve test coverage across the repository.

AI generated by Daily Test Coverage Improver

…commands

Vitest 4 does not support the --coverageDirectory command-line flag.
The coverage directory is already configured in vitest.config.ts files
via the reportsDirectory option. Removed the flag to fix test execution.

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

cla-assistant Bot commented Jun 15, 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