Skip to content

Commit

Permalink
fix: Remove the text/plain attachment embedded in the cucumber report…
Browse files Browse the repository at this point in the history
… when an error is thrown. (#222)

Adds no value and crashes on non latin text.
  • Loading branch information
jcundill authored and lgandecki committed Aug 25, 2019
1 parent fc14b44 commit 4527d7a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/cukejson/cucumberDataCollector.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,10 @@ class CucumberDataCollector {
duration: this.timeTaken()
};
} else {
const attachment = {
index: this.currentStep,
testCase: this.formatTestCase(this.currentScenario),
data: btoa(err.message.toString()),
media: { type: "text/plain" }
};
this.stepResults[this.currentStep] = {
status: statuses.FAILED,
duration: this.timeTaken(),
exception: this.testError,
attachment
exception: this.testError
};
}
this.onFinishScenario(this.currentScenario);
Expand Down

0 comments on commit 4527d7a

Please sign in to comment.