import { Context , Endpoint , ServiceBroker } from 'moleculer' ; export namespace DummyContext { const broker = new ServiceBroker ( { logger : false , maxCallLevel : 5 } ) ; const endpoint = { broker , id : 'server-123' , node : { } , local : true , state : false , } ; export const getCall = ( data ) => { const ctx = Context . create ( broker , endpoint , data ) ; ctx . call = jest . fn ( async ( ) => ( broker . Promise as any ) . resolve ( { } ) ) ; return ctx ; } ; }