Skip to content

Commit 4f6c048

Browse files
committed
Fix unit tests
1 parent fbed31f commit 4f6c048

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/collections/serialize/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ export class Serialize {
509509
args: { id: string; supportsTargets: boolean } & NearOptions<T>
510510
): SearchNearObjectArgs => {
511511
const { targets, targetVectors } = Serialize.targetVector(args.supportsTargets, args.targetVector);
512-
console.log(targets, targetVectors);
513512
return {
514513
...Serialize.common(args),
515514
nearObject: NearObject.fromPartial({

src/collections/serialize/unit.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ describe('Unit testing of Serialize', () => {
149149
vector: [1, 2, 3],
150150
targetVector: 'title',
151151
fusionType: 'Ranked',
152+
supportsTargets: false,
152153
});
153154
expect(args).toEqual<SearchHybridArgs>({
154155
hybridSearch: Hybrid.fromPartial({
@@ -169,6 +170,7 @@ describe('Unit testing of Serialize', () => {
169170
certainty: 0.6,
170171
distance: 0.4,
171172
targetVector: 'audio',
173+
supportsTargets: false,
172174
});
173175
expect(args).toEqual<SearchNearAudioArgs>({
174176
nearAudio: NearAudioSearch.fromPartial({
@@ -184,6 +186,7 @@ describe('Unit testing of Serialize', () => {
184186
it('should parse args for nearDepth', () => {
185187
const args = Serialize.nearDepth({
186188
depth: 'depth',
189+
supportsTargets: false,
187190
});
188191
expect(args).toEqual<SearchNearDepthArgs>({
189192
nearDepth: NearDepthSearch.fromPartial({
@@ -196,6 +199,7 @@ describe('Unit testing of Serialize', () => {
196199
it('should parse args for nearIMU', () => {
197200
const args = Serialize.nearIMU({
198201
imu: 'imu',
202+
supportsTargets: false,
199203
});
200204
expect(args).toEqual<SearchNearIMUArgs>({
201205
nearIMU: NearIMUSearch.fromPartial({
@@ -208,6 +212,7 @@ describe('Unit testing of Serialize', () => {
208212
it('should parse args for nearImage', () => {
209213
const args = Serialize.nearImage({
210214
image: 'image',
215+
supportsTargets: false,
211216
});
212217
expect(args).toEqual<SearchNearImageArgs>({
213218
nearImage: NearImageSearch.fromPartial({
@@ -220,6 +225,7 @@ describe('Unit testing of Serialize', () => {
220225
it('should parse args for nearObject', () => {
221226
const args = Serialize.nearObject({
222227
id: 'id',
228+
supportsTargets: false,
223229
});
224230
expect(args).toEqual<SearchNearObjectArgs>({
225231
nearObject: NearObject.fromPartial({
@@ -242,6 +248,7 @@ describe('Unit testing of Serialize', () => {
242248
concepts: ['good'],
243249
force: 0.6,
244250
},
251+
supportsTargets: false,
245252
});
246253
expect(args).toEqual<SearchNearTextArgs>({
247254
nearText: NearTextSearch.fromPartial({
@@ -264,6 +271,7 @@ describe('Unit testing of Serialize', () => {
264271
it('should parse args for nearThermal', () => {
265272
const args = Serialize.nearThermal({
266273
thermal: 'thermal',
274+
supportsTargets: false,
267275
});
268276
expect(args).toEqual<SearchNearThermalArgs>({
269277
nearThermal: NearThermalSearch.fromPartial({
@@ -276,6 +284,7 @@ describe('Unit testing of Serialize', () => {
276284
it('should parse args for nearVector', () => {
277285
const args = Serialize.nearVector({
278286
vector: [1, 2, 3],
287+
supportsTargets: false,
279288
});
280289
expect(args).toEqual<SearchNearVectorArgs>({
281290
nearVector: NearVector.fromPartial({
@@ -288,6 +297,7 @@ describe('Unit testing of Serialize', () => {
288297
it('should parse args for nearVideo', () => {
289298
const args = Serialize.nearVideo({
290299
video: 'video',
300+
supportsTargets: false,
291301
});
292302
expect(args).toEqual<SearchNearVideoArgs>({
293303
nearVideo: NearVideoSearch.fromPartial({

0 commit comments

Comments
 (0)