How to use the bloomrpc-mock.walkServices function in bloomrpc-mock

To help you get started, we’ve selected a few bloomrpc-mock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uw-labs / bloomrpc / app / behaviour / importProtos.ts View on Github external
function parseServices(proto: Proto) {

  const services: {[key: string]: ProtoService} = {};

  walkServices(proto, (service: Service, _: any, serviceName: string) => {
    const mocks = mockRequestMethods(service);
    services[serviceName] = {
      serviceName: serviceName,
      proto,
      methodsMocks: mocks,
      methodsName: Object.keys(mocks),
    };
  });

  return services;
}

bloomrpc-mock

Automock your grpc services

LGPL-3.0
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis