Skip to content

Commit

Permalink
rebase and update off main
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed Mar 26, 2024
1 parent 8395a36 commit 9073c2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/data/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { FetchCommand } from '../fetch';
import { QueryCommand } from '../query';
import { UpdateCommand } from '../update';
import { UpsertCommand } from '../upsert';
import { VectorOperationsProvider } from '../vectorOperationsProvider';
import { DataOperationsProvider } from '../dataOperationsProvider';
import { Index } from '../index';
import type { ScoredPineconeRecord } from '../query';

jest.mock('../fetch');
jest.mock('../query');
jest.mock('../update');
jest.mock('../upsert');
jest.mock('../vectorOperationsProvider');
jest.mock('../dataOperationsProvider');

describe('Index', () => {
let config;
Expand All @@ -27,7 +27,7 @@ describe('Index', () => {
});

describe('index initialization', () => {
test('passes config, indexName, indexHostUrl, and additionalHeaders to VectorOperationsProvider', () => {
test('passes config, indexName, indexHostUrl, and additionalHeaders to DataOperationsProvider', () => {
const indexHostUrl = 'https://test-api-pinecone.io';
const additionalHeaders = { 'x-custom-header': 'custom-value' };
new Index(
Expand All @@ -37,8 +37,8 @@ describe('Index', () => {
indexHostUrl,
additionalHeaders
);
expect(VectorOperationsProvider).toHaveBeenCalledTimes(1);
expect(VectorOperationsProvider).toHaveBeenCalledWith(
expect(DataOperationsProvider).toHaveBeenCalledTimes(1);
expect(DataOperationsProvider).toHaveBeenCalledWith(
config,
'index-name',
indexHostUrl,
Expand Down

0 comments on commit 9073c2b

Please sign in to comment.