@code-pushup/coverage-plugin
Version:
Code PushUp plugin for tracking code coverage ☂
28 lines (27 loc) • 1.26 kB
TypeScript
import type { ProjectConfiguration } from '@nx/devkit';
import type { JestExecutorOptions } from '@nx/jest/src/executors/jest/schema';
import type { VitestExecutorOptions } from '@nx/vite/executors';
import type { CoverageResult } from '../config.js';
/**
* @param targets nx targets to be used for measuring coverage, test by default
* @returns An array of coverage result information for the coverage plugin.
*/
export declare function getNxCoveragePaths(targets?: string[], verbose?: boolean): Promise<CoverageResult[]>;
export type VitestCoverageConfig = {
test: {
coverage?: {
reporter?: string[];
reportsDirectory?: string;
};
};
};
export type JestCoverageConfig = {
coverageDirectory?: string;
coverageReporters?: string[];
};
export declare function getCoveragePathsForTarget(project: ProjectConfiguration, target: string): Promise<CoverageResult>;
export declare function getCoveragePathForVitest(options: VitestExecutorOptions, project: ProjectConfiguration, target: string): Promise<string | {
pathToProject: string;
resultsPath: string;
}>;
export declare function getCoveragePathForJest(options: JestExecutorOptions, project: ProjectConfiguration, target: string): Promise<string>;