Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix browser example
closes #448
  • Loading branch information
karinepires authored and charlierudolph committed Nov 2, 2015
1 parent c195c0f commit 45c2da7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 3 additions & 7 deletions example/example.js
Expand Up @@ -39,16 +39,12 @@
case 'StepResult':
var result;
var stepResult = event.getPayloadItem('stepResult');
if (stepResult.isSuccessful()) {
result = {status: 'passed'};
} else if (stepResult.isPending()) {
result = {status: 'pending'};
} else if (stepResult.isUndefined() || stepResult.isSkipped()) {
result = {status:'skipped'};
} else {
if (stepResult.getStatus() === Cucumber.Status.FAILED) {
var error = stepResult.getFailureException();
var errorMessage = error.stack || error;
result = {status: 'failed', error_message: errorMessage};
} else {
result = {status: stepResult.getStatus()};
}
formatter.match({uri:'report.feature', step: {line: currentStep.getLine()}});
formatter.result(result);
Expand Down
4 changes: 1 addition & 3 deletions example/index.html
Expand Up @@ -37,9 +37,7 @@ <h2>Step definitions</h2>
<textarea id="step-definitions">///// Your World /////

// Provide a custom World constructor. It's optional, a default one is supplied.
this.World = function(callback) {
callback();
};
this.World = function() {};

// Define your World!

Expand Down

0 comments on commit 45c2da7

Please sign in to comment.