import assert from 'assert' ; import { Given , When , Then , setWorldConstructor } from '@cucumber/cucumber' ; function CustomWorld ( ) { this . cucumbers = 0 ; } setWorldConstructor ( CustomWorld ) ; Given ( 'I have {int} cucumbers' , function ( count ) { this . cucumbers = count ; } ) ; When ( 'I eat {int} cucumbers' , function ( eaten ) { this . cucumbers -= eaten ; } ) ; Then ( 'I have {int} cucumbers left' , function ( left ) { assert . strictEqual ( this . cucumbers , left ) ; } ) ; Given ( 'a step with a doctring:' , function ( ) { } ) ; When ( 'a step with a datatable' , function ( ) { } ) ;