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