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' },
{ enabled: true, modelName: 'ViT-B-32__openai' },
);
expect(smartMock.upsert).toHaveBeenCalledWith({
assetId: 'asset-1',
clipEmbedding: [0.01, 0.02, 0.03],
});
expect(smartMock.upsert).toHaveBeenCalledWith(
{
assetId: 'asset-1',
},
[0.01, 0.02, 0.03],
);
});
});
});

View file

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

View file

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