import * as Common from './common' ; import * as CLI from './cli' ; import * as ReplExpect from './repl-expect' ; interface Param { command : string ; expect : string ; exact : boolean ; streaming ? : boolean ; } export class TestStringResponse { public constructor ( public readonly param ) { } public string ( ) { const { command , expect , exact , streaming } = this . param ; describe ( `string response for command=${ command } ${ process . env . MOCHA_RUN_TARGET || '' }` , function ( this ) { before ( Common . before ( this ) ) ; after ( Common . after ( this ) ) ; it ( 'should return a string' , ( ) => CLI . command ( command , this . app ) . then ( ReplExpect . okWithString ( expect , exact , streaming ) ) . catch ( Common . oops ( this , true ) ) ) ; } ) ; } }