Skip to content

Commit bf87282

Browse files
authoredJan 8, 2023
feat(coverage): istanbul coverage only for changed files (#2385)
* feat: Istanbul Coverage only for changed Files Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: latest pnpm install changes Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: removed previous changes related to ctx.changedTests and watchAll config option Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: cleanOnReRun=true and all=false if watch mode is enabled Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: deleted example Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: updated pnpm-lock file after deleting example Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: change default value for clearOnReRun=true, since watch= true by default Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: Updated pnpm-lock.yaml file Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: Update pnpm-lock.yaml Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> * chore: Update pnpm.yaml file as per in main branch Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com> Signed-off-by: GurkiranSingh <gurkiransinghk@gmail.com>
1 parent 59766fa commit bf87282

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed
 

‎docs/config/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ Clean coverage results before running tests
635635
#### cleanOnRerun
636636

637637
- **Type:** `boolean`
638-
- **Default:** `false`
638+
- **Default:** `true`
639639
- **Available for providers:** `'c8' | 'istanbul'`
640640

641641
Clean coverage report on watch rerun

‎packages/vitest/src/defaults.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ const defaultCoverageExcludes = [
2525
]
2626

2727
const coverageConfigDefaults = {
28+
all: false,
2829
provider: 'c8',
2930
enabled: false,
3031
clean: true,
31-
cleanOnRerun: false,
32+
cleanOnRerun: true,
3233
reportsDirectory: './coverage',
3334
excludeNodeModules: true,
3435
exclude: defaultCoverageExcludes,

‎packages/vitest/src/types/coverage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export interface BaseCoverageOptions {
101101
/**
102102
* Clean coverage report on watch rerun
103103
*
104-
* @default false
104+
* @default true
105105
*/
106106
cleanOnRerun?: boolean
107107

0 commit comments

Comments
 (0)
Please sign in to comment.