Skip to content

Commit

Permalink
feat!: enable coverage.ignoreEmptyLines by default (#5543)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored May 7, 2024
1 parent ee097db commit 3199494
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 2,109 deletions.
2 changes: 1 addition & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ Sets thresholds for files matching the glob pattern.
#### coverage.ignoreEmptyLines

- **Type:** `boolean`
- **Default:** `false`
- **Default:** `true` (`false` in v1)
- **Available for providers:** `'v8'`
- **CLI:** `--coverage.ignoreEmptyLines=<boolean>`

Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const coverageConfigDefaults: ResolvedCoverageOptions = {
reporter: [['text', {}], ['html', {}], ['clover', {}], ['json', {}]],
extension: ['.js', '.cjs', '.mjs', '.ts', '.mts', '.cts', '.tsx', '.jsx', '.vue', '.svelte', '.marko'],
allowExternal: false,
ignoreEmptyLines: false,
ignoreEmptyLines: true,
processingConcurrency: Math.min(20, os.availableParallelism?.() ?? os.cpus().length),
}

Expand Down
Loading

0 comments on commit 3199494

Please sign in to comment.