-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add
NullCoverageProvider
to handled disabled coverage
- Loading branch information
1 parent
112e9c5
commit a8d1d61
Showing
5 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
packages/vitest/src/integrations/coverage/NullCoverageProvider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { ResolvedCoverageOptions } from '../../types' | ||
import type { BaseCoverageProvider } from './base' | ||
|
||
export class NullCoverageProvider implements BaseCoverageProvider { | ||
resolveOptions(): ResolvedCoverageOptions { | ||
return { | ||
provider: null, | ||
enabled: false, | ||
clean: false, | ||
cleanOnRerun: false, | ||
reportsDirectory: 'coverage', | ||
tempDirectory: 'coverage/tmp', | ||
} | ||
} | ||
|
||
initialize() {} | ||
clean() {} | ||
onAfterAllFilesRun() {} | ||
onAfterSuiteRun() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters