Skip to content

Commit 16a033e

Browse files
committed
Comment out missed image tests that are no longer tested
1 parent a14e2f6 commit 16a033e

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
lines changed

test/images.journey.test.ts

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
1-
import fs from 'fs';
2-
import weaviate, { toBase64FromMedia } from '../src/';
1+
// import fs from 'fs';
2+
// import weaviate, { toBase64FromMedia } from '../src/';
33

4-
describe('Journey testing of the image functionality', () => {
5-
const collectionName = 'ImageJourneyTesting';
4+
// describe('Journey testing of the image functionality', () => {
5+
// const collectionName = 'ImageJourneyTesting';
66

7-
beforeAll(async () => {
8-
const client = await weaviate.connectToLocal();
9-
await client.collections.delete(collectionName);
10-
});
7+
// beforeAll(async () => {
8+
// const client = await weaviate.connectToLocal();
9+
// await client.collections.delete(collectionName);
10+
// });
1111

12-
it('should create a collection with an image property and capable vectorizer', async () => {
13-
const client = await weaviate.connectToLocal();
14-
await client.collections.create({
15-
name: collectionName,
16-
properties: [
17-
{
18-
name: 'image',
19-
dataType: 'blob',
20-
},
21-
],
22-
vectorizers: weaviate.configure.vectorizer.img2VecNeural({
23-
imageFields: ['image'],
24-
}),
25-
});
26-
});
12+
// it('should create a collection with an image property and capable vectorizer', async () => {
13+
// const client = await weaviate.connectToLocal();
14+
// await client.collections.create({
15+
// name: collectionName,
16+
// properties: [
17+
// {
18+
// name: 'image',
19+
// dataType: 'blob',
20+
// },
21+
// ],
22+
// vectorizers: weaviate.configure.vectorizer.img2VecNeural({
23+
// imageFields: ['image'],
24+
// }),
25+
// });
26+
// });
2727

28-
it('should insert an encoded image', async () => {
29-
const client = await weaviate.connectToLocal();
30-
await client.collections.get(collectionName).data.insert({
31-
image: await toBase64FromMedia('./public/favicon.ico'),
32-
});
33-
});
28+
// it('should insert an encoded image', async () => {
29+
// const client = await weaviate.connectToLocal();
30+
// await client.collections.get(collectionName).data.insert({
31+
// image: await toBase64FromMedia('./public/favicon.ico'),
32+
// });
33+
// });
3434

35-
it('should retrieve the encoded image', async () => {
36-
const client = await weaviate.connectToLocal();
37-
const res = await client.collections
38-
.get(collectionName)
39-
.query.fetchObjects({ returnProperties: ['image'] });
40-
expect(res.objects[0].properties.image).toBeDefined();
41-
});
35+
// it('should retrieve the encoded image', async () => {
36+
// const client = await weaviate.connectToLocal();
37+
// const res = await client.collections
38+
// .get(collectionName)
39+
// .query.fetchObjects({ returnProperties: ['image'] });
40+
// expect(res.objects[0].properties.image).toBeDefined();
41+
// });
4242

43-
it('should search on the encoded image vector with a file path string', async () => {
44-
const client = await weaviate.connectToLocal();
45-
const res = await client.collections.get(collectionName).query.nearImage('./public/favicon.ico');
46-
expect(res.objects.length).toEqual(1);
47-
});
43+
// it('should search on the encoded image vector with a file path string', async () => {
44+
// const client = await weaviate.connectToLocal();
45+
// const res = await client.collections.get(collectionName).query.nearImage('./public/favicon.ico');
46+
// expect(res.objects.length).toEqual(1);
47+
// });
4848

49-
it('should search on the encoded image vector with a buffer', async () => {
50-
const client = await weaviate.connectToLocal();
51-
const res = await client.collections
52-
.get(collectionName)
53-
.query.nearImage(fs.readFileSync('./public/favicon.ico')); // eslint-disable-line no-sync
54-
expect(res.objects.length).toEqual(1);
55-
});
56-
});
49+
// it('should search on the encoded image vector with a buffer', async () => {
50+
// const client = await weaviate.connectToLocal();
51+
// const res = await client.collections
52+
// .get(collectionName)
53+
// .query.nearImage(fs.readFileSync('./public/favicon.ico')); // eslint-disable-line no-sync
54+
// expect(res.objects.length).toEqual(1);
55+
// });
56+
// });

0 commit comments

Comments
 (0)