Tags: karinepires/cucumber-js
Tags
Adds fail fast mode, multiple formatters, target multiple lines in sa… …me feature file, disable colors, custom snippet plugins and more. BACKWARD INCOMPATIBLE CHANGES: - Hooks and step definitions signatures are now strictly checked. Accepting too few or too many arguments in your step definitions and hooks will trigger errors. - World constructor functions do not receive a callback from Cucumber anymore. Asynchronous constructors are not idiomatic and therefore made the World API non-intuitive, compared to other libraries. This was also unnecessary as calling asynchronous code before a scenario is achievable through a Before hook. For example, you might currently be asynchronously launching a Webdriver-driven browser window in your World constructor. Since Cucumber 0.8.0, you can't wait for that call to be done in your constructor because it will not receive any callback to invoke asynchronously. Instead, you'll need to move that call to a Before hook: ```javascript // old: this.World = function MyWorld(callback) { var driver = new webdriver.Builder().build(); driver.get('http://google.com') .then(callback); }; // Cucumber 0.8.0+: this.World = function MyWorld() { // only synchronous code allowed here ... } this.Before(function (scenario, callback) { var driver = new webdriver.Builder().build(); driver.get('http://google.com') .then(callback); }); ``` And if you're using promises anyway, you can simply return one from the hook and remove the callback argument altogether.
PreviousNext