import { Suite , SuiteFunction } from 'mocha' ; export const then = it ; export const given = beforeEach ; export const when = < SuiteFunction > function ( title , fn ) { context ( 'when ' + title , fn ) ; } ; when . only = ( title , fn ? ) => context . only ( 'when ' + title , fn ! ) ; when . skip = ( title , fn ) => context . skip ( 'when ' + title , fn ) ;