Skip to content

Commit

Permalink
feat(coverage): --coverageTestShowOnlyFailed
Browse files Browse the repository at this point in the history
fix #606
  • Loading branch information
vogloblinsky committed Aug 24, 2018
1 parent 238e9e8 commit 3b4e8a5
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 134 deletions.
2 changes: 1 addition & 1 deletion src/app/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ at least one config for the 'info' or 'source' tab in --navTabConfig.`);
let overFiles = files.filter(f => {
let overTest =
f.coveragePercent >= this.configuration.mainData.coverageMinimumPerFile;
if (overTest) {
if (overTest && !this.configuration.mainData.coverageTestShowOnlyFailed) {
logger.info(
`${f.coveragePercent} % for file ${f.filePath} - over minimum per file`
);
Expand Down
5 changes: 3 additions & 2 deletions src/app/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ export class Configuration implements ConfigurationInterface {
coverageTestThresholdFail: COMPODOC_DEFAULTS.coverageTestThresholdFail,
coverageTestPerFile: false,
coverageMinimumPerFile: COMPODOC_DEFAULTS.defaultCoverageMinimumPerFile,
unitTestCoverage: '',
unitTestData: undefined,
unitTestCoverage: '',
unitTestData: undefined,
coverageTestShowOnlyFailed: COMPODOC_DEFAULTS.coverageTestShowOnlyFailed,
routesLength: 0,
angularVersion: '',
exportFormat: COMPODOC_DEFAULTS.exportFormat,
Expand Down
5 changes: 3 additions & 2 deletions src/app/interfaces/main-data.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export interface MainDataInterface {
coverageTestThresholdFail: boolean;
coverageTestPerFile: boolean;
coverageMinimumPerFile: number;
unitTestCoverage: string;
unitTestData: Object;
coverageTestShowOnlyFailed: boolean;
unitTestCoverage: string;
unitTestData: Object;
routesLength: number;
angularVersion: string;
exportFormat: string;
Expand Down
Loading

0 comments on commit 3b4e8a5

Please sign in to comment.