s9tpepper / karma-cucumberjs

A Cucumber.js Karma test runner adapter.
MIT License
54 stars 21 forks source link

Synchronous step definitions #18

Open ComLock opened 8 years ago

ComLock commented 8 years ago

Does karma-cucumberjs not support synchronous step definitions like cucumber-js does? https://github.com/cucumber/cucumber-js#synchronous-step-definitions

I never get to when in the below example:

PhantomJS 1.9.8 (Mac OS X 0.0.0) LOG: 'Given'
WARN [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
Feature:
    Feature text
    More feature text

    Scenario: Scenario text
    Given a
    When b
    Then c
    scenario.Given(/^a$/, function () {
        console.log('Given');
        console.log('leaving Given');
    });

    scenario.When(/^b$/, function () {
        console.log('When');
        console.log('leaving When');
    });
s9tpepper commented 8 years ago

I hadn't seen that feature, probably needs an update of the cucumber lib. I'm on the cusp of freeing up some time which will allow me to do some more work on this plugin.

-omar

On Wednesday, December 16, 2015, Christian Westgaard < notifications@github.com> wrote:

Does karma-cucumberjs not support synchronous step definitions like cucumber-js does? https://github.com/cucumber/cucumber-js#synchronous-step-definitions

I never get to when in the below example:

PhantomJS 1.9.8 (Mac OS X 0.0.0) LOG: 'Given' WARN [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.

Feature: Feature text More feature text

Scenario: Scenario text
Given a
When b
Then c

scenario.Given(/^a$/, function () {
    console.log('Given');
    console.log('leaving Given');
});

scenario.When(/^b$/, function () {
    console.log('When');
    console.log('leaving When');
});

— Reply to this email directly or view it on GitHub https://github.com/s9tpepper/karma-cucumberjs/issues/18.