diff --git a/core/indexing/chunk/code.test.ts b/core/indexing/chunk/code.test.ts index 129a0bcfc..cdd5ad2f3 100644 --- a/core/indexing/chunk/code.test.ts +++ b/core/indexing/chunk/code.test.ts @@ -1,5 +1,5 @@ import { ChunkWithoutID } from "../.."; -import { countTokensAsync } from "../../llm/countTokens"; +import { cleanupAsyncEncoders, countTokensAsync } from "../../llm/countTokens"; import { codeChunker } from "./code"; async function genToArr(generator: AsyncGenerator): Promise { @@ -85,6 +85,8 @@ async function collectContents( } describe("codeChunker function definition", () => { + afterAll(async () => await cleanupAsyncEncoders()); + test("class methods never exceed maxChunkSize", async () => { const body = Array.from( { length: 200 },