mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
fix(server): make system config core singleton (#4392)
* make system config core singleton * refactor * fix tests * chore: fix tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { ISystemConfigRepository } from '@app/domain';
|
||||
import { ISystemConfigRepository, SystemConfigCore } from '@app/domain';
|
||||
|
||||
export const newSystemConfigRepositoryMock = (reset = true): jest.Mocked<ISystemConfigRepository> => {
|
||||
if (reset) {
|
||||
SystemConfigCore.reset();
|
||||
}
|
||||
|
||||
export const newSystemConfigRepositoryMock = (): jest.Mocked<ISystemConfigRepository> => {
|
||||
return {
|
||||
load: jest.fn().mockResolvedValue([]),
|
||||
readFile: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user