mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): metric repo (#8278)
* refactor * redundant `implements` * simplify * remove `enabled`
This commit is contained in:
parent
c56c04a82b
commit
c45e28ab53
4 changed files with 79 additions and 34 deletions
|
|
@ -2,8 +2,29 @@ import { IMetricRepository } from 'src/interfaces/metric.interface';
|
|||
|
||||
export const newMetricRepositoryMock = (): jest.Mocked<IMetricRepository> => {
|
||||
return {
|
||||
addToCounter: jest.fn(),
|
||||
updateGauge: jest.fn(),
|
||||
updateHistogram: jest.fn(),
|
||||
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(),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue