Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

Commit

Permalink
fix: coverageOptions.reporter not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 18, 2022
1 parent a086c15 commit 4bb90c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/demo/peeky.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ export default defineConfig({
'setup-test.ts',
],
// collectCoverage: true,
coverageOptions: {
reporter: 'json-summary',
},
})
3 changes: 3 additions & 0 deletions packages/peeky-config/src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { ModuleFilterOption, PeekyConfig } from './types.js'
export function processConfig (config: PeekyConfig): PeekyConfig {
config.buildInclude = normalizeModuleFilters(config.buildInclude)
config.buildExclude = normalizeModuleFilters(config.buildExclude)
if (config.coverageOptions?.reporter && !Array.isArray(config.coverageOptions.reporter)) {
config.coverageOptions.reporter = [config.coverageOptions.reporter]
}
return config
}

Expand Down

0 comments on commit 4bb90c2

Please sign in to comment.