Skip to content

Commit cfd88fb

Browse files
committed
fix: conditional failed stop in cucumber
1 parent 2051403 commit cfd88fb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "test-results-parser",
3-
"version": "0.2.8",
3+
"version": "0.2.9",
44
"description": "Parse test results from JUnit, TestNG, xUnit, cucumber and many more",
55
"main": "src/index.js",
66
"types": "./src/index.d.ts",

src/parsers/cucumber.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class CucumberParser extends BaseParser {
8888
test_case.status = test_case.total === test_case.passed ? 'PASS' : 'FAIL';
8989
if (test_case.status === "FAIL") {
9090
const failed_step = test_case.steps.find(step => step.status === "FAIL");
91-
test_case.failure = failed_step.failure;
92-
test_case.stack_trace = failed_step.stack_trace
91+
test_case.failure = failed_step?.failure ?? '';
92+
test_case.stack_trace = failed_step?.stack_trace ?? '';
9393
}
9494
const { tags, metadata } = this.#getTagsAndMetadata(scenario);
9595
test_case.tags = tags;

0 commit comments

Comments
 (0)