This PR adds a test case for the VectorStoreIndex class in the packages/core/src/tests directory. The test case validates the functionality of the VectorStoreIndex class methods, including the constructor, init, fromDocuments, asRetriever, and asQueryEngine. Mock data is used to simulate the behavior of these methods and assert the expected outcomes. This ensures that the VectorStoreIndex class is working as expected and any future changes to the class will not break its functionality.
Summary
Created a new test file named VectorStoreIndex.test.ts in the packages/core/src/tests directory.
Imported the necessary dependencies including the VectorStoreIndex class.
Created a describe block for the VectorStoreIndex class and within it, created test cases for each of the methods in the VectorStoreIndex class.
Used mock data to simulate the behavior of these methods and assert the expected outcomes.
Fixes #4.
To checkout this PR branch, run the following command in your terminal:
Description
This PR adds a test case for the VectorStoreIndex class in the
packages/core/src/tests
directory. The test case validates the functionality of the VectorStoreIndex class methods, including the constructor,init
,fromDocuments
,asRetriever
, andasQueryEngine
. Mock data is used to simulate the behavior of these methods and assert the expected outcomes. This ensures that the VectorStoreIndex class is working as expected and any future changes to the class will not break its functionality.Summary
VectorStoreIndex.test.ts
in thepackages/core/src/tests
directory.Fixes #4.
To checkout this PR branch, run the following command in your terminal: