From 7d51e5257eabffb09fd27ca9915b4cbbf7dd2638 Mon Sep 17 00:00:00 2001 From: bryan cook <3217452+bryanbcook@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:58:22 -0400 Subject: [PATCH] fixed for skipped tests #70 --- src/parsers/junit.js | 2 ++ tests/data/junit/skipped-tests.xml | 1 + tests/parser.junit.spec.js | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parsers/junit.js b/src/parsers/junit.js index bcc71d2..1dffc96 100644 --- a/src/parsers/junit.js +++ b/src/parsers/junit.js @@ -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'; } diff --git a/tests/data/junit/skipped-tests.xml b/tests/data/junit/skipped-tests.xml index 72c27b3..9a66cc0 100644 --- a/tests/data/junit/skipped-tests.xml +++ b/tests/data/junit/skipped-tests.xml @@ -2,6 +2,7 @@ + \ No newline at end of file diff --git a/tests/parser.junit.spec.js b/tests/parser.junit.spec.js index c2a20ed..91833f8 100644 --- a/tests/parser.junit.spec.js +++ b/tests/parser.junit.spec.js @@ -139,7 +139,7 @@ describe('Parser - JUnit', () => { passed: 0, skipped: 0, stack_trace: "", - status: "PASS", + status: "SKIP", meta_data: new Map(), steps: [], total: 0