Skip to content

Commit

Permalink
fixed for skipped tests #70
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanbcook committed Jul 4, 2024
1 parent b617a1d commit 7d51e52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/parsers/junit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ function getTestCase(rawCase, suite_meta) {
if (rawCase.failure && rawCase.failure.length > 0) {
test_case.status = 'FAIL';
setErrorAndStackTrace(test_case, rawCase);
} else if (rawCase.skipped != undefined) {
test_case.status = 'SKIP';
} else {
test_case.status = 'PASS';
}
Expand Down
1 change: 1 addition & 0 deletions tests/data/junit/skipped-tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<testsuites id="id" name="result name" tests="2" failures="0" errors="" skipped="1" time="10">
<testsuite id="codereview.cobol.analysisProvider" name="suite name" tests="1" failures="0" time="10">
<testcase id="codereview.cobol.rules.ProgramIdRule" name="Use a program name that matches the source file name" time="10">
<skipped/>
</testcase>
</testsuite>
</testsuites>
2 changes: 1 addition & 1 deletion tests/parser.junit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('Parser - JUnit', () => {
passed: 0,
skipped: 0,
stack_trace: "",
status: "PASS",
status: "SKIP",
meta_data: new Map(),
steps: [],
total: 0
Expand Down

0 comments on commit 7d51e52

Please sign in to comment.