This PR adds a test case for the VectorStoreIndex class in the packages/core/src/tests directory. The test case focuses on the main functionalities of the VectorStoreIndex class, including the initialization of the index, adding nodes to the index, and retrieving nodes from the index. The test case uses Jest as the testing framework, as it is already being used in the project.
Summary of Changes
Added a new test case for the VectorStoreIndex class in the packages/core/src/tests directory.
Created a mock instance of the VectorStoreIndex class and added nodes to it.
Retrieved the nodes from the index and asserted that they match the added ones.
Used Jest's describe, beforeEach, afterEach, and test functions to structure the test case.
Fixes #7.
To checkout this PR branch, run the following command in your terminal:
Description
This PR adds a test case for the
VectorStoreIndex
class in thepackages/core/src/tests
directory. The test case focuses on the main functionalities of theVectorStoreIndex
class, including the initialization of the index, adding nodes to the index, and retrieving nodes from the index. The test case uses Jest as the testing framework, as it is already being used in the project.Summary of Changes
VectorStoreIndex
class in thepackages/core/src/tests
directory.VectorStoreIndex
class and added nodes to it.describe
,beforeEach
,afterEach
, andtest
functions to structure the test case.Fixes #7.
To checkout this PR branch, run the following command in your terminal: