Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Istanbul Coverage only for changed Files #2385

Merged
merged 16 commits into from Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/vitest/src/defaults.ts
Expand Up @@ -25,6 +25,7 @@ const defaultCoverageExcludes = [
]

const coverageConfigDefaults = {
all: false,
provider: 'c8',
enabled: false,
clean: true,
Expand Down
5 changes: 5 additions & 0 deletions packages/vitest/src/node/config.ts
Expand Up @@ -92,6 +92,11 @@ export function resolveConfig(
mode,
} as ResolvedConfig

if (resolved.watch) {
resolved.coverage.cleanOnRerun = true
resolved.coverage.all = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this override user's configurations, or simply set default values?

I'm not sure if we should override the values, as users are then unable to configure these at all in watch mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does overrides the user config, I have modified the changed, after new commits. Thanks for pointing these out.

}

if (viteConfig.base !== '/')
resolved.base = viteConfig.base

Expand Down
107 changes: 29 additions & 78 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.