File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change 39
39
case 'StepResult' :
40
40
var result ;
41
41
var stepResult = event . getPayloadItem ( 'stepResult' ) ;
42
- if ( stepResult . isSuccessful ( ) ) {
43
- result = { status : 'passed' } ;
44
- } else if ( stepResult . isPending ( ) ) {
45
- result = { status : 'pending' } ;
46
- } else if ( stepResult . isUndefined ( ) || stepResult . isSkipped ( ) ) {
47
- result = { status :'skipped' } ;
48
- } else {
42
+ if ( stepResult . getStatus ( ) === Cucumber . Status . FAILED ) {
49
43
var error = stepResult . getFailureException ( ) ;
50
44
var errorMessage = error . stack || error ;
51
45
result = { status : 'failed' , error_message : errorMessage } ;
46
+ } else {
47
+ result = { status : stepResult . getStatus ( ) } ;
52
48
}
53
49
formatter . match ( { uri :'report.feature' , step : { line : currentStep . getLine ( ) } } ) ;
54
50
formatter . result ( result ) ;
Original file line number Diff line number Diff line change @@ -37,9 +37,7 @@ <h2>Step definitions</h2>
37
37
< textarea id ="step-definitions "> ///// Your World /////
38
38
39
39
// Provide a custom World constructor. It's optional, a default one is supplied.
40
- this.World = function(callback) {
41
- callback();
42
- };
40
+ this.World = function() {};
43
41
44
42
// Define your World!
45
43
You can’t perform that action at this time.
0 commit comments