MCPcopy Index your code
hub / github.com/code-pushup/cli / detectConfigFile

Function detectConfigFile

packages/plugin-coverage/src/lib/binding.ts:242–252  ·  view source on GitHub ↗
(
  targetDir: string,
  framework: Framework,
)

Source from the content-addressed store, hash-verified

240}
241
242async function detectConfigFile(
243 targetDir: string,
244 framework: Framework,
245): Promise<string | undefined> {
246 if (framework === 'other') {
247 return undefined;
248 }
249 const files = await readdir(targetDir, { encoding: 'utf8' });
250 const pattern = framework === 'vitest' ? VITEST_CONFIG : JEST_CONFIG;
251 return files.find(file => pattern.test(file));
252}
253
254function defaultTestCommand(framework: Framework): string {
255 switch (framework) {

Callers 1

binding.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected