mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor(server): make storage core singleton (#4608)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { IStorageRepository } from '@app/domain';
|
||||
import { IStorageRepository, StorageCore } from '@app/domain';
|
||||
|
||||
export const newStorageRepositoryMock = (reset = true): jest.Mocked<IStorageRepository> => {
|
||||
if (reset) {
|
||||
StorageCore.reset();
|
||||
}
|
||||
|
||||
export const newStorageRepositoryMock = (): jest.Mocked<IStorageRepository> => {
|
||||
return {
|
||||
createZipStream: jest.fn(),
|
||||
createReadStream: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user