Skip to content

vitest dot notation for junit reporter#1382

Merged
Saga4 merged 2 commits into
mainfrom
add_vitest_reporter_for_output_format
Feb 4, 2026
Merged

vitest dot notation for junit reporter#1382
Saga4 merged 2 commits into
mainfrom
add_vitest_reporter_for_output_format

Conversation

@Saga4

@Saga4 Saga4 commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@claude

claude Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

PR Review Summary

Prek Checks

Passed - Auto-fixed formatting issues

Mypy Type Checks

Fixed - Resolved 6 type errors:

  • Added type parameters to CompletedProcess return types
  • Fixed get_cross_platform_subprocess_run_args return type to use Any
  • Added type: ignore comments for subprocess.run kwargs unpacking

Committed fixes:

  • codeflash/languages/javascript/vitest_runner.py - Added CompletedProcess[str] type parameters
  • codeflash/code_utils/shell_utils.py - Changed return type from dict[str, str] to dict[str, Any]

Code Review

No critical issues found

This PR fixes Vitest JUnit XML reporter output by using dot notation (--outputFile.junit=) instead of plain --outputFile=. This is required when multiple reporters are configured.

Changes:

  • codeflash/languages/javascript/vitest_runner.py:126 - Changed to --outputFile.junit={output_file}
  • codeflash/languages/javascript/vitest_runner.py:161 - Changed to --outputFile.junit={output_file}
  • codeflash/languages/javascript/vitest_runner.py:464 - Changed to --outputFile.junit={output_file}
  • Added debug logging for JUnit XML file creation (lines 285-298)
  • Added warning logging for test failures (lines 264-270)
  • Updated test assertions to match new format

Analysis:

  • The changes correctly address the Vitest reporter configuration issue
  • Dot notation is the correct Vitest API for specifying output files per reporter
  • Added logging will help debug future JUnit XML generation issues
  • All test assertions properly updated to match new format

Test Coverage

⚠️ Coverage analysis skipped - Test suite takes too long to run in this environment

The changes primarily modify:

  1. Command building logic (string formatting)
  2. Debug/warning logging statements
  3. Test assertions

These changes have low risk as they:

  • Do not modify core logic or algorithms
  • Add observability through logging
  • Are covered by existing test: test_vitest_runner.py

Optimization PRs Status

No merges - All 30 pending optimization PRs have failing CI checks and cannot be merged automatically.


Last updated: 2026-02-04 13:11 UTC

@Saga4 Saga4 merged commit 6fc2c17 into main Feb 4, 2026
23 of 27 checks passed
@Saga4 Saga4 deleted the add_vitest_reporter_for_output_format branch February 4, 2026 13:20
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