Skip to content

Commit 96c34f5

Browse files
committed
Fixed proper callback for cucumber tests failing.
1 parent db6d4ca commit 96c34f5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/v1/tck/steps/environment.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ module.exports = function () {
1313
callback();
1414
});
1515

16+
this.After(function (scenario, callback) {
17+
if (!scenario.isSuccessful()) {
18+
console.log("FAILED! Scenario: " + scenario.getName());
19+
console.log("With Exception: " + scenario.getException());
20+
return process.exit(2);
21+
}
22+
callback();
23+
});
24+
1625
function findTag(scenario, tag) {
1726
for (var i in scenario.getTags()) {
1827
if (scenario.getTags()[i].getName() == tag) {

0 commit comments

Comments
 (0)