Logo: Relish

  1. Sign in

Project: Cucumber-js

Asynchronous step definition callbacks

In order to test asynchronous code
As a dev
I want step definitions to call back asynchronously

Execute feature with asynchronous step definition
a step definition matching /^an asynchronous step passes$/ calling back asynchronously after 50 milliseconds
a step definition matching /^a step passes$/
I run the following feature:
Feature: Asynchronous step definition body
  Scenario: Waiting for an asynchronous step to call back
    When an asynchronous step passes
    Then a step passes
the feature should have run successfully

Last published over 5 years ago by jbpros.