Skip to content

Commit

Permalink
fix: check if error message exists on fail (#229)
Browse files Browse the repository at this point in the history
fix #225
  • Loading branch information
jimmy882 authored and lgandecki committed Aug 27, 2019
1 parent 850ceda commit 1c6f126
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/cukejson/cucumberDataCollector.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class CucumberDataCollector {

this.onFail = err => {
this.testError = err;
if (err.message.indexOf("Step implementation missing for") > -1) {
if (
err.message &&
err.message.indexOf("Step implementation missing for") > -1
) {
this.stepResults[this.currentStep] = {
status: statuses.UNDEFINED,
duration: this.timeTaken()
Expand Down

0 comments on commit 1c6f126

Please sign in to comment.