File tree Expand file tree Collapse file tree
codeflash/languages/javascript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -446,7 +446,21 @@ def run_vitest_behavioral_tests(
446446 # Pre-creating an empty directory may cause vitest to delete it
447447 logger .debug (f"Coverage will be written to: { coverage_dir } " )
448448
449- vitest_cmd .extend (["--coverage" , "--coverage.reporter=json" , f"--coverage.reportsDirectory={ coverage_dir } " ])
449+ vitest_cmd .extend (
450+ [
451+ "--coverage" ,
452+ "--coverage.reporter=json" ,
453+ f"--coverage.reportsDirectory={ coverage_dir } " ,
454+ # Disable project-level coverage thresholds to prevent false failures.
455+ # Codeflash-generated tests typically cover only a single function (~1-2% of codebase),
456+ # which would fail projects with thresholds like 70% lines/functions configured
457+ # in their vitest.config.ts.
458+ "--coverage.thresholds.lines=0" ,
459+ "--coverage.thresholds.functions=0" ,
460+ "--coverage.thresholds.statements=0" ,
461+ "--coverage.thresholds.branches=0" ,
462+ ]
463+ )
450464 # Note: Removed --coverage.enabled=true (redundant) and --coverage.all false
451465 # The version mismatch between vitest and @vitest/coverage-v8 can cause
452466 # issues with coverage flag parsing. Let vitest use default settings.
You can’t perform that action at this time.
0 commit comments