Skip to content

Instantly share code, notes, and snippets.

@jbpros
Last active August 29, 2015 14:01
Show Gist options
  • Save jbpros/b7f7f57d3ec1dc49f4e0 to your computer and use it in GitHub Desktop.
Save jbpros/b7f7f57d3ec1dc49f4e0 to your computer and use it in GitHub Desktop.
Feature: A
Scenario: a
Given a
module.exports = function () {
this.Before(function (scenario, callback) {
console.log("world:", this, "scenario:", scenario, "callback:", callback);
callback();
});
};
‣ cucumber.js a.feature
world: {} scenario: { payloadType: 'scenario',
setBackground: [Function: setBackground],
buildScenarios: [Function: buildScenarios],
getKeyword: [Function: getKeyword],
getName: [Function: getName],
getDescription: [Function: getDescription],
getUri: [Function: getUri],
getLine: [Function: getLine],
getBackground: [Function: getBackground],
addStep: [Function: addStep],
getLastStep: [Function: getLastStep],
getMaxStepLength: [Function],
setSteps: [Function: setSteps],
getSteps: [Function: getSteps],
addTags: [Function: addTags],
addInheritedtags: [Function: addInheritedtags],
getTags: [Function: getTags],
getOwnTags: [Function: getOwnTags],
acceptVisitor: [Function: acceptVisitor],
instructVisitorToVisitBackgroundSteps: [Function: instructVisitorToVisitBackgroundSteps],
instructVisitorToVisitScenarioSteps: [Function: instructVisitorToVisitScenarioSteps],
instructVisitorToVisitSteps: [Function: instructVisitorToVisitSteps] } callback: function () {
iterate();
}
U
1 scenario (1 undefined)
1 step (1 undefined)
You can implement step definitions for undefined steps with these snippets:
this.Given(/^a$/, function (callback) {
// Write code here that turns the phrase above into concrete actions
callback.pending();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment