Cucumber.js v2.0.0-rc.4 Release Notes

Release Date: 2016-12-19 // over 7 years ago
  • 💥 Breaking Changes
    • ⚡️ update support code library interface - instead of exporting a function and calling methods on this, require the cucumber module and call defineSupportCode which passes an object as the first argument whch exposes the methods. Overriding the world constructor has changed from overriding the World property to calling setWorldConstructor.

      // 1.3.1
      module.exports = function () {
        this.Given(/^a step$/, function() {});
        this.World = CustomWorld
      });
      
      // 2.0.0
      var {defineSupportCode} = require('cucumber');
      
      defineSupportCode(function({Given, setWorldConstructor}) {
        Given(/^a step$/, function() {});
        setWorldConstructor(CustomWorld);
      });