How to use the ts-mockito.reset function in ts-mockito

To help you get started, we’ve selected a few ts-mockito 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 balassy / aws-lambda-typescript / src / cities / cities.controller.spec.ts View on Github external
beforeEach(() => {
    reset(citiesServiceMock);
    const citiesServiceMockInstance: CitiesService = instance(citiesServiceMock);
    controller = new CitiesController(citiesServiceMockInstance);
    testData = {
      city: {
        country: chance.country(),
        id: chance.natural(),
        name: chance.city(),
        populationDensity: chance.natural()
      },
      error: {
        code: chance.word(),
        description: chance.sentence()
      }
    };
  });
github balassy / aws-lambda-typescript / src / swagger / swagger.controller.spec.ts View on Github external
beforeEach(() => {
    reset(swaggerServiceMock);
    const citiesServiceMockInstance: SwaggerService = instance(swaggerServiceMock);
    controller = new SwaggerController(citiesServiceMockInstance);
    testData = {
      error: {
        code: chance.word(),
        description: chance.sentence()
      },
      swaggerDoc: {
        info: {
          title: chance.sentence(),
          version: chance.word(),
        },
        paths: {
        }
      }
    };
github balassy / aws-lambda-typescript / src / cities / cities.service.spec.ts View on Github external
beforeEach(() => {
    reset(citiesRepositoryMock);
    service = new CitiesService(citiesRepositoryMockInstance, process.env);
    testCity = {
      country: chance.country(),
      id: chance.natural(),
      name: chance.city(),
      populationDensity: chance.natural()
    };
  });