Skip to content

Commit

Permalink
feat(coverage): istanbul coverage only for changed files (#2385)
Browse files Browse the repository at this point in the history
* feat: Istanbul Coverage only for changed Files

Signed-off-by: GurkiranSingh <[email protected]>

* chore: latest pnpm install changes

Signed-off-by: GurkiranSingh <[email protected]>

* chore: removed previous changes related to ctx.changedTests and watchAll config option

Signed-off-by: GurkiranSingh <[email protected]>

* chore: cleanOnReRun=true and all=false if watch mode is enabled

Signed-off-by: GurkiranSingh <[email protected]>

* chore: deleted example

Signed-off-by: GurkiranSingh <[email protected]>

* chore: updated pnpm-lock file after deleting example

Signed-off-by: GurkiranSingh <[email protected]>

* chore: change default value for clearOnReRun=true, since watch= true by default

Signed-off-by: GurkiranSingh <[email protected]>

* chore: Updated pnpm-lock.yaml file

Signed-off-by: GurkiranSingh <[email protected]>

* chore: Update pnpm-lock.yaml

Signed-off-by: GurkiranSingh <[email protected]>

* chore: Update pnpm.yaml file as per in main branch

Signed-off-by: GurkiranSingh <[email protected]>

Signed-off-by: GurkiranSingh <[email protected]>
  • Loading branch information
g4rry420 authored Jan 8, 2023
1 parent 59766fa commit bf87282
Show file tree
Hide file tree
Showing 3 changed files with 4 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 @@ -635,7 +635,7 @@ Clean coverage results before running tests
#### cleanOnRerun

- **Type:** `boolean`
- **Default:** `false`
- **Default:** `true`
- **Available for providers:** `'c8' | 'istanbul'`

Clean coverage report on watch rerun
Expand Down
3 changes: 2 additions & 1 deletion packages/vitest/src/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ const defaultCoverageExcludes = [
]

const coverageConfigDefaults = {
all: false,
provider: 'c8',
enabled: false,
clean: true,
cleanOnRerun: false,
cleanOnRerun: true,
reportsDirectory: './coverage',
excludeNodeModules: true,
exclude: defaultCoverageExcludes,
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/types/coverage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export interface BaseCoverageOptions {
/**
* Clean coverage report on watch rerun
*
* @default false
* @default true
*/
cleanOnRerun?: boolean

Expand Down

0 comments on commit bf87282

Please sign in to comment.