MCPcopy Create free account
hub / github.com/code-pushup/cli / hasLcovReporter

Function hasLcovReporter

packages/plugin-coverage/src/lib/config-file.ts:6–17  ·  view source on GitHub ↗
(content: string, framework: string)

Source from the content-addressed store, hash-verified

4const VITEST_DEFAULTS = ['text', 'html', 'clover', 'json'];
5
6export function hasLcovReporter(content: string, framework: string): boolean {
7 switch (framework) {
8 case 'vitest':
9 return /['"]lcov['"]/.test(content) && content.includes('reporter');
10 case 'jest':
11 return (
12 !content.includes('coverageReporters') || /['"]lcov['"]/.test(content)
13 );
14 default:
15 return false;
16 }
17}
18
19export function addLcovReporter(content: string, framework: string): string {
20 switch (framework) {

Callers 2

configureLcovReporterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected