Skip to content

Commit 6a106d5

Browse files
committed
chore: lint & format
1 parent 457a9a1 commit 6a106d5

File tree

2 files changed

+67
-59
lines changed

2 files changed

+67
-59
lines changed

src/collections/data/integration.test.ts

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -341,49 +341,57 @@ describe('Testing of the collection.data methods with a single target reference'
341341

342342
it('should be able to delete a reference between two objects', () => {
343343
// Insert 2 objects
344-
return collection.data.insertMany([
345-
{ testProp: "refLeft" }, { testProp: "refRight" },
346-
])
347-
// Create a reference between them
348-
.then(inserted => collection.data.referenceAdd({
349-
fromProperty: 'ref',
350-
fromUuid: inserted.allResponses[0] as string,
351-
to: inserted.allResponses[1] as string,
352-
}).then(() => inserted))
344+
return (
345+
collection.data
346+
.insertMany([{ testProp: 'refLeft' }, { testProp: 'refRight' }])
347+
// Create a reference between them
348+
.then((inserted) =>
349+
collection.data
350+
.referenceAdd({
351+
fromProperty: 'ref',
352+
fromUuid: inserted.allResponses[0] as string,
353+
to: inserted.allResponses[1] as string,
354+
})
355+
.then(() => inserted)
356+
)
353357

354-
// Assert that the reference exists
355-
.then(inserted =>
356-
collection.query.fetchObjectById(inserted.allResponses[0] as string, {
357-
returnReferences: [{ linkOn: 'ref' }],
358-
})
359-
.then((obj) => {
360-
expect(obj).not.toBeNull();
361-
expect(obj?.references?.ref?.objects).toHaveLength(1);
358+
// Assert that the reference exists
359+
.then((inserted) =>
360+
collection.query
361+
.fetchObjectById(inserted.allResponses[0] as string, {
362+
returnReferences: [{ linkOn: 'ref' }],
363+
})
364+
.then((obj) => {
365+
expect(obj).not.toBeNull();
366+
expect(obj?.references?.ref?.objects).toHaveLength(1);
362367

363-
// Propagate the list of inserted IDs
364-
return Promise.resolve(inserted);
365-
})
366-
)
368+
// Propagate the list of inserted IDs
369+
return Promise.resolve(inserted);
370+
})
371+
)
367372

368-
// Delete reference between them
369-
.then(inserted =>
370-
collection.data.referenceDelete({
371-
fromProperty: 'ref',
372-
fromUuid: inserted.allResponses[0] as string,
373-
to: inserted.allResponses[1] as string,
374-
})
375-
.then(() => inserted))
373+
// Delete reference between them
374+
.then((inserted) =>
375+
collection.data
376+
.referenceDelete({
377+
fromProperty: 'ref',
378+
fromUuid: inserted.allResponses[0] as string,
379+
to: inserted.allResponses[1] as string,
380+
})
381+
.then(() => inserted)
382+
)
376383

377-
// Assert the reference does not exist
378-
.then(inserted =>
379-
collection.query.fetchObjectById(inserted.allResponses[0] as string, {
380-
returnReferences: [{ linkOn: 'ref' }],
384+
// Assert the reference does not exist
385+
.then((inserted) =>
386+
collection.query.fetchObjectById(inserted.allResponses[0] as string, {
387+
returnReferences: [{ linkOn: 'ref' }],
388+
})
389+
)
390+
.then((obj) => {
391+
expect(obj).not.toBeNull();
392+
expect(obj?.references?.ref?.objects).toEqual([]);
381393
})
382-
)
383-
.then((obj) => {
384-
expect(obj).not.toBeNull();
385-
expect(obj?.references?.ref?.objects).toEqual([]);
386-
});
394+
);
387395
});
388396

389397
it('should be able to add many references in batch', () => {

src/schema/journey.test.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -734,19 +734,19 @@ async function newClassObject(className: string, client: WeaviateClient): Promis
734734
maxConnections: 64,
735735
multivector: (await isVer(client, 29, 0))
736736
? {
737-
aggregation: 'maxSim',
738-
enabled: false,
739-
...((await isVer(client, 31, 0))
740-
? {
741-
muvera: {
742-
enabled: false,
743-
dprojections: 16,
744-
ksim: 4,
745-
repetitions: 10,
746-
},
747-
}
748-
: {}),
749-
}
737+
aggregation: 'maxSim',
738+
enabled: false,
739+
...((await isVer(client, 31, 0))
740+
? {
741+
muvera: {
742+
enabled: false,
743+
dprojections: 16,
744+
ksim: 4,
745+
repetitions: 10,
746+
},
747+
}
748+
: {}),
749+
}
750750
: undefined,
751751
pq: {
752752
bitCompression: false,
@@ -764,17 +764,17 @@ async function newClassObject(className: string, client: WeaviateClient): Promis
764764
},
765765
sq: (await isVer(client, 26, 0))
766766
? {
767-
enabled: false,
768-
rescoreLimit: 20,
769-
trainingLimit: 100000,
770-
}
767+
enabled: false,
768+
rescoreLimit: 20,
769+
trainingLimit: 100000,
770+
}
771771
: undefined,
772772
rq: (await isVer(client, 32, 0))
773773
? {
774-
enabled: false,
775-
bits: 8,
776-
rescoreLimit: 20,
777-
}
774+
enabled: false,
775+
bits: 8,
776+
rescoreLimit: 20,
777+
}
778778
: undefined,
779779
skip: false,
780780
efConstruction: 128,

0 commit comments

Comments
 (0)