diff --git a/packages/core/tests/ingestion/ingestion-pipeline.test.ts b/packages/core/tests/ingestion/ingestion-pipeline.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..746741803b62a058e2cf309009953c0fd66935b7 --- /dev/null +++ b/packages/core/tests/ingestion/ingestion-pipeline.test.ts @@ -0,0 +1,22 @@ +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(); +});