Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add skip-empty option for html & text reports (#140)
- Loading branch information
Showing
8 changed files
with
86 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/istanbul-reports/test/fixtures/specs/empty-file-skip-empty.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"title": "empty file - skip empty", | ||
"opts": { | ||
"skipEmpty": true | ||
}, | ||
"textReportExpected": "----------|----------|----------|----------|----------|----------------|\nFile | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |\n----------|----------|----------|----------|----------|----------------|\n----------|----------|----------|----------|----------|----------------|\n", | ||
"map": { | ||
"/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js": { | ||
"path": "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js", | ||
"statementMap": {}, | ||
"fnMap": {}, | ||
"branchMap": {}, | ||
"s": {}, | ||
"f": {}, | ||
"b": {} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/istanbul-reports/test/fixtures/specs/empty-file.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"title": "empty file - show 0%", | ||
"textReportExpected": "----------|----------|----------|----------|----------|----------------|\nFile | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |\n----------|----------|----------|----------|----------|----------------|\nAll files | 0 | 0 | 0 | 0 |\u001b[31;1m \u001b[0m |\n empty.js | 0 | 0 | 0 | 0 |\u001b[31;1m \u001b[0m |\n----------|----------|----------|----------|----------|----------------|\n", | ||
"map": { | ||
"/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js": { | ||
"path": "/dev/git/istanbuljs/packages/istanbul-reports/lib/text/empty.js", | ||
"statementMap": {}, | ||
"fnMap": {}, | ||
"branchMap": {}, | ||
"s": {}, | ||
"f": {}, | ||
"b": {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters