import { AssertionError } from '@serenity-js/core' ; import { TableDefinition } from 'cucumber' ; type Callback = ( error ? : Error , pending ? : string ) => void ; export = function ( ) { this . Given ( /^.*step (?:.*) passes$/ , function ( done ) { done ( ) ; } ) ; this . Given ( /^.*step (?:.*) fails with generic error$/ , function ( done ) { done ( new Error ( `Something's wrong` ) ) ; } ) ; this . Given ( /^.*step (?:.*) fails with assertion error$/ , function ( done ) { done ( new AssertionError ( `Expected false to equal true` , false , true ) ) ; } ) ; this . Given ( /^.*step (?:.*) marked as pending/ , function ( done ) { done ( void 0 , 'pending' ) ; } ) ; this . Given ( /^.*step (?:.*) receives a table:$/ , function ( data , done ) { done ( ) ; } ) ; this . Given ( /^.*step (?:.*) receives a doc string:$/ , function ( docstring , done ) { done ( ) ; } ) ; this . Given ( /^.*step that times out$/ , { timeout : 100 } , function ( done ) { setTimeout ( done , 1000 ) ; } ) ; } ;