mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
Fix test
This commit is contained in:
parent
7653eda8b3
commit
33b7d1fc06
1 changed files with 4 additions and 0 deletions
|
@ -11,11 +11,13 @@ import { DownloadService } from '../../modules/download/download.service';
|
||||||
import { BackgroundTaskService } from '../../modules/background-task/background-task.service';
|
import { BackgroundTaskService } from '../../modules/background-task/background-task.service';
|
||||||
import { IAssetUploadedJob, IVideoTranscodeJob } from '@app/job';
|
import { IAssetUploadedJob, IVideoTranscodeJob } from '@app/job';
|
||||||
import { Queue } from 'bull';
|
import { Queue } from 'bull';
|
||||||
|
import { IAlbumRepository } from "../album/album-repository";
|
||||||
|
|
||||||
describe('AssetService', () => {
|
describe('AssetService', () => {
|
||||||
let sui: AssetService;
|
let sui: AssetService;
|
||||||
let a: Repository<AssetEntity>; // TO BE DELETED AFTER FINISHED REFACTORING
|
let a: Repository<AssetEntity>; // TO BE DELETED AFTER FINISHED REFACTORING
|
||||||
let assetRepositoryMock: jest.Mocked<IAssetRepository>;
|
let assetRepositoryMock: jest.Mocked<IAssetRepository>;
|
||||||
|
let albumRepositoryMock: jest.Mocked<IAlbumRepository>;
|
||||||
let downloadServiceMock: jest.Mocked<Partial<DownloadService>>;
|
let downloadServiceMock: jest.Mocked<Partial<DownloadService>>;
|
||||||
let backgroundTaskServiceMock: jest.Mocked<BackgroundTaskService>;
|
let backgroundTaskServiceMock: jest.Mocked<BackgroundTaskService>;
|
||||||
let assetUploadedQueueMock: jest.Mocked<Queue<IAssetUploadedJob>>;
|
let assetUploadedQueueMock: jest.Mocked<Queue<IAssetUploadedJob>>;
|
||||||
|
@ -122,6 +124,7 @@ describe('AssetService', () => {
|
||||||
getAssetWithNoThumbnail: jest.fn(),
|
getAssetWithNoThumbnail: jest.fn(),
|
||||||
getAssetWithNoSmartInfo: jest.fn(),
|
getAssetWithNoSmartInfo: jest.fn(),
|
||||||
getExistingAssets: jest.fn(),
|
getExistingAssets: jest.fn(),
|
||||||
|
countByIdAndUser: jest.fn(),
|
||||||
};
|
};
|
||||||
|
|
||||||
downloadServiceMock = {
|
downloadServiceMock = {
|
||||||
|
@ -130,6 +133,7 @@ describe('AssetService', () => {
|
||||||
|
|
||||||
sui = new AssetService(
|
sui = new AssetService(
|
||||||
assetRepositoryMock,
|
assetRepositoryMock,
|
||||||
|
albumRepositoryMock,
|
||||||
a,
|
a,
|
||||||
backgroundTaskServiceMock,
|
backgroundTaskServiceMock,
|
||||||
assetUploadedQueueMock,
|
assetUploadedQueueMock,
|
||||||
|
|
Loading…
Reference in a new issue