mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: remove album entity, update types (#17450)
This commit is contained in:
parent
854ea13d6a
commit
52ae06c119
44 changed files with 473 additions and 396 deletions
|
|
@ -39,9 +39,12 @@ describe(MemoryService.name, () => {
|
|||
it('should create a memory from an asset', async () => {
|
||||
const { sut, repos, getRepository } = createSut();
|
||||
|
||||
const now = DateTime.fromObject({ year: 2025, month: 2, day: 25 }, { zone: 'utc' });
|
||||
const now = DateTime.fromObject({ year: 2025, month: 2, day: 25 }, { zone: 'utc' }) as DateTime<true>;
|
||||
const user = mediumFactory.userInsert();
|
||||
const asset = mediumFactory.assetInsert({ ownerId: user.id, localDateTime: now.minus({ years: 1 }).toISO() });
|
||||
const asset = mediumFactory.assetInsert({
|
||||
ownerId: user.id,
|
||||
localDateTime: now.minus({ years: 1 }).toISO(),
|
||||
});
|
||||
const jobStatus = mediumFactory.assetJobStatusInsert({ assetId: asset.id });
|
||||
|
||||
const userRepo = getRepository('user');
|
||||
|
|
@ -86,7 +89,7 @@ describe(MemoryService.name, () => {
|
|||
it('should not generate a memory twice for the same day', async () => {
|
||||
const { sut, repos, getRepository } = createSut();
|
||||
|
||||
const now = DateTime.fromObject({ year: 2025, month: 2, day: 20 }, { zone: 'utc' });
|
||||
const now = DateTime.fromObject({ year: 2025, month: 2, day: 20 }, { zone: 'utc' }) as DateTime<true>;
|
||||
|
||||
const assetRepo = getRepository('asset');
|
||||
const memoryRepo = getRepository('memory');
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ describe(MetadataService.name, () => {
|
|||
process.env.TZ = serverTimeZone ?? undefined;
|
||||
|
||||
const { filePath } = await createTestFile(exifData);
|
||||
mocks.assetJob.getForMetadataExtraction.mockResolvedValue({ id: 'asset-1', originalPath: filePath } as never);
|
||||
mocks.assetJob.getForMetadataExtraction.mockResolvedValue({ id: 'asset-1', originalPath: filePath } as any);
|
||||
|
||||
await sut.handleMetadataExtraction({ id: 'asset-1' });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue