How to use bloomrpc-mock - 3 common examples

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;
}
github uw-labs / bloomrpc / app / behaviour / importProtos.ts View on Github external
const protos = await Promise.all(filePaths.map((fileName) =>
      fromFileName(fileName, [
        ...(importPaths ? importPaths : []),
        ...commonProtosPath,
      ])
    ));
github uw-labs / bloomrpc / app / behaviour / importProtos.ts View on Github external
walkServices(proto, (service: Service, _: any, serviceName: string) => {
    const mocks = mockRequestMethods(service);
    services[serviceName] = {
      serviceName: serviceName,
      proto,
      methodsMocks: mocks,
      methodsName: Object.keys(mocks),
    };
  });

bloomrpc-mock

Automock your grpc services

LGPL-3.0
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis