Skip to content

Instantly share code, notes, and snippets.

@paulbjensen
Created June 18, 2018 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulbjensen/2182fa46900591b61f485d4802f8257c to your computer and use it in GitHub Desktop.
Save paulbjensen/2182fa46900591b61f485d4802f8257c to your computer and use it in GitHub Desktop.
Version 2 of the world.js file, part of an article on Medium
// Dependencies
const api = require('api');
const web = require('web');
const { setWorldConstructor } = require('cucumber');
const puppeteer = require('puppeteer');
const scope = require('./support/scope');
const World = function() {
scope.host = web.host;
scope.driver = puppeteer;
scope.context = {};
scope.api = api;
scope.web = web;
};
setWorldConstructor(World);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment