Cucumber-js: World constructor example with phantomjs
问题 In the cucumber-js page is showed an example with Zombie: // features/support/world.js var zombie = require('zombie'); var WorldConstructor = function WorldConstructor(callback) { var browser = new zombie(); var world = { browser: browser, // this.browser will be available in step definitions visit: function(url, callback) { // this.visit will be available in step definitions this.browser.visit(url, callback); } }; callback(world); // tell Cucumber we're finished and to use our world object