mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-16 13:00:55 +00:00
* ci: report mutation and change risk for edited functions * ci: show function mutation progress in logs * fix: Exclude Shared Database Test Suites from Quality Targets --------- Co-authored-by: Lia <lia@librechat.ai>
31 lines
699 B
TypeScript
31 lines
699 B
TypeScript
import { literalGlob } from './changes.mts';
|
|
|
|
/** Jest accepts one JSON string for collectCoverageFrom, not separate file arguments. */
|
|
export function coverageArgs(
|
|
config: string,
|
|
files: string[],
|
|
output: string,
|
|
tests: string[],
|
|
): string[] {
|
|
return [
|
|
'--config',
|
|
config,
|
|
'--ci',
|
|
'--runInBand',
|
|
'--forceExit',
|
|
'--coverage',
|
|
'--coverageProvider=babel',
|
|
'--coverageReporters=json',
|
|
'--coverageDirectory',
|
|
output,
|
|
'--coverageThreshold={}',
|
|
'--json',
|
|
'--outputFile',
|
|
`${output}/tests.json`,
|
|
'--passWithNoTests',
|
|
'--collectCoverageFrom',
|
|
JSON.stringify(files.map(literalGlob)),
|
|
'--runTestsByPath',
|
|
...tests,
|
|
];
|
|
}
|