Skip to content

Commit

Permalink
feat!: enable coverage.all by default (#4265)
Browse files Browse the repository at this point in the history
  • Loading branch information
AriPerkkio authored Oct 7, 2023
1 parent 611f0b2 commit 5a741ca
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ List of files excluded from coverage as glob patterns.
#### coverage.all

- **Type:** `boolean`
- **Default:** `false`
- **Default:** `true` (since Vitest `1.0.0`)
- **Available for providers:** `'v8' | 'istanbul'`
- **CLI:** `--coverage.all`, `--coverage.all=false`

Expand Down
1 change: 1 addition & 0 deletions packages/vitest/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const defaultCoverageExcludes = [
export const coverageConfigDefaults: ResolvedCoverageOptions = {
provider: 'v8',
enabled: false,
all: true,
clean: true,
cleanOnRerun: true,
reportsDirectory: './coverage',
Expand Down
1 change: 1 addition & 0 deletions test/coverage-test/testing-options.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ for (const provider of ['v8', 'istanbul']) {
coverage: {
enabled: true,
clean: true,
all: false,
provider,
...testConfig.coverage,
},
Expand Down
1 change: 0 additions & 1 deletion test/coverage-test/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default defineConfig({
customProviderModule: provider === 'custom' ? 'custom-provider' : undefined,
include: ['src/**'],
clean: true,
all: true,
reporter: [
'text',
['html'],
Expand Down
1 change: 0 additions & 1 deletion test/workspaces/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default defineConfig({
test: {
coverage: {
enabled: true,
all: true,
},
reporters: ['default', 'json'],
outputFile: './results.json',
Expand Down

0 comments on commit 5a741ca

Please sign in to comment.