Skip to content

Commit 68b361f

Browse files
committed
remove test
1 parent 98b89eb commit 68b361f

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

src/connection/helpers.test.ts

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import weaviate from '../index.js';
2-
import { connectToWeaviateCloud } from './helpers.js';
32

43
const WCD_URL = 'https://piblpmmdsiknacjnm1ltla.c1.europe-west3.gcp.weaviate.cloud';
54
const WCD_KEY = 'cy4ua772mBlMdfw3YnclqAWzFhQt0RLIN0sl';
@@ -30,57 +29,4 @@ describe('Testing of the connection helper methods', () => {
3029
throw new Error('it should not have errord: ' + e);
3130
});
3231
});
33-
34-
describe('adds Weaviate Embedding Service headers', () => {
35-
it('to empty headers', async () => {
36-
const clientMakerMock = jest.fn().mockResolvedValue(undefined);
37-
38-
await connectToWeaviateCloud(WCD_URL, clientMakerMock, {
39-
authCredentials: new weaviate.ApiKey(WCD_KEY),
40-
});
41-
42-
expect(clientMakerMock.mock.calls[0][0].headers).toEqual({
43-
'X-Weaviate-Api-Key': WCD_KEY,
44-
'X-Weaviate-Cluster-Url': WCD_URL,
45-
});
46-
});
47-
48-
it('to existing headers', async () => {
49-
const clientMakerMock = jest.fn().mockResolvedValue(undefined);
50-
51-
await connectToWeaviateCloud(WCD_URL, clientMakerMock, {
52-
authCredentials: new weaviate.ApiKey(WCD_KEY),
53-
headers: { existingHeader: 'existingValue' },
54-
});
55-
56-
expect(clientMakerMock.mock.calls[0][0].headers).toEqual({
57-
existingHeader: 'existingValue',
58-
'X-Weaviate-Api-Key': WCD_KEY,
59-
'X-Weaviate-Cluster-Url': WCD_URL,
60-
});
61-
});
62-
});
63-
64-
describe('does not add Weaviate Embedding Service headers when not using API key', () => {
65-
it('to empty headers', async () => {
66-
const clientMakerMock = jest.fn().mockResolvedValue(undefined);
67-
68-
await connectToWeaviateCloud(WCD_URL, clientMakerMock, {
69-
authCredentials: new weaviate.AuthUserPasswordCredentials({ username: 'test' }),
70-
});
71-
72-
expect(clientMakerMock.mock.calls[0][0].headers).toBe(undefined);
73-
});
74-
75-
it('to existing headers', async () => {
76-
const clientMakerMock = jest.fn().mockResolvedValue(undefined);
77-
78-
await connectToWeaviateCloud(WCD_URL, clientMakerMock, {
79-
authCredentials: new weaviate.AuthUserPasswordCredentials({ username: 'test' }),
80-
headers: { existingHeader: 'existingValue' },
81-
});
82-
83-
expect(clientMakerMock.mock.calls[0][0].headers).toEqual({ existingHeader: 'existingValue' });
84-
});
85-
});
8632
});

0 commit comments

Comments
 (0)