Skip to content
Snippets Groups Projects
Unverified Commit aeefc77d authored by Alex Yang's avatar Alex Yang Committed by GitHub
Browse files

test: load large amount of data won't cause error (#762)

parent 13d8d7cb
No related branches found
No related tags found
No related merge requests found
import { Document } from "llamaindex/Node";
import { IngestionPipeline } from "llamaindex/ingestion/IngestionPipeline";
import { test } from "vitest";
// Refs: https://github.com/run-llama/LlamaIndexTS/pull/760
test("load large data should not cause RangeError #760", async () => {
const pipeline = new IngestionPipeline({
reader: {
loadData: async () => {
return Array.from(
{ length: 1e6 },
(_, i) =>
new Document({
id_: `${i}`,
text: "some text",
}),
);
},
},
});
await pipeline.prepareInput();
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment