fixed tests

This commit is contained in:
mertalev 2023-11-22 17:57:10 -05:00
parent 0f2411f096
commit 57fd3a32f3
No known key found for this signature in database
GPG key ID: 9181CD92C0A1C5E3
3 changed files with 7 additions and 5 deletions

View file

@ -195,10 +195,12 @@ describe(SmartInfoService.name, () => {
{ imagePath: 'path/to/resize.ext' }, { imagePath: 'path/to/resize.ext' },
{ enabled: true, modelName: 'ViT-B-32__openai' }, { enabled: true, modelName: 'ViT-B-32__openai' },
); );
expect(smartMock.upsert).toHaveBeenCalledWith({ expect(smartMock.upsert).toHaveBeenCalledWith(
assetId: 'asset-1', {
clipEmbedding: [0.01, 0.02, 0.03], assetId: 'asset-1',
}); },
[0.01, 0.02, 0.03],
);
}); });
}); });
}); });

View file

@ -209,7 +209,6 @@ export const sharedLinkStub = {
tags: [], tags: [],
objects: ['a', 'b', 'c'], objects: ['a', 'b', 'c'],
asset: null as any, asset: null as any,
clipEmbedding: [0.12, 0.13, 0.14],
}, },
webpPath: '', webpPath: '',
thumbhash: null, thumbhash: null,

View file

@ -32,6 +32,7 @@ export const newAssetRepositoryMock = (): jest.Mocked<IAssetRepository> => {
getTimeBuckets: jest.fn(), getTimeBuckets: jest.fn(),
restoreAll: jest.fn(), restoreAll: jest.fn(),
softDeleteAll: jest.fn(), softDeleteAll: jest.fn(),
search: jest.fn(),
getAssetIdByCity: jest.fn(), getAssetIdByCity: jest.fn(),
getAssetIdByTag: jest.fn(), getAssetIdByTag: jest.fn(),
searchMetadata: jest.fn(), searchMetadata: jest.fn(),