Permalink
Browse files

fix(serenity-cucumber): Cucumber generator steps are correctly recogn…

…ised and synced
  • Loading branch information...
jan-molak committed Jan 25, 2017
1 parent 8f1db4f commit 4475c2cc6a210b34639922ff8015738f459e6c82
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/serenity-cucumber/webdriver_synchroniser.ts
@@ -3,8 +3,8 @@ import withArityOf = require('util-arity');
import { StepDefinitions } from 'cucumber';
import * as webdriver from 'selenium-webdriver';
let isGeneratorFn = require('is-generator'); // tslint:disable-line:no-var-requires - JS module with no typings
let co = require('co'); // tslint:disable-line:no-var-requires - JS module with no typings
let isGenerator = require('is-generator'); // tslint:disable-line:no-var-requires - JS module with no typings
let co = require('co'); // tslint:disable-line:no-var-requires - JS module with no typings
/**
* Monkey-patches Cucumber.js Given/When/Then step generators to ensure that any step definition they create
@@ -62,7 +62,7 @@ export function synchronise (cucumber: StepDefinitions, controlFlow: webdriver.p
let deferred = new Deferred<void>(),
context = this;
if (isGeneratorFn(originalStep)) {
if (isGenerator.fn(originalStep)) {
originalStep = co.wrap(originalStep);
}

0 comments on commit 4475c2c

Please sign in to comment.