2024-03-24 23:02:04 -04:00
|
|
|
import { IMetricRepository } from 'src/interfaces/metric.interface';
|
|
|
|
|
|
|
|
export const newMetricRepositoryMock = (): jest.Mocked<IMetricRepository> => {
|
|
|
|
return {
|
2024-03-25 19:15:11 -04:00
|
|
|
api: {
|
|
|
|
addToCounter: jest.fn(),
|
|
|
|
addToGauge: jest.fn(),
|
|
|
|
addToHistogram: jest.fn(),
|
|
|
|
configure: jest.fn(),
|
|
|
|
},
|
|
|
|
host: {
|
|
|
|
addToCounter: jest.fn(),
|
|
|
|
addToGauge: jest.fn(),
|
|
|
|
addToHistogram: jest.fn(),
|
|
|
|
configure: jest.fn(),
|
|
|
|
},
|
|
|
|
jobs: {
|
|
|
|
addToCounter: jest.fn(),
|
|
|
|
addToGauge: jest.fn(),
|
|
|
|
addToHistogram: jest.fn(),
|
|
|
|
configure: jest.fn(),
|
|
|
|
},
|
|
|
|
repo: {
|
|
|
|
addToCounter: jest.fn(),
|
|
|
|
addToGauge: jest.fn(),
|
|
|
|
addToHistogram: jest.fn(),
|
|
|
|
configure: jest.fn(),
|
|
|
|
},
|
2024-03-24 23:02:04 -04:00
|
|
|
};
|
|
|
|
};
|