Changesets · Branches · Tags · Compare
| Changeset | 79db7a83c7e6bcac769a225f2d68b6c15248e8342ce1ce55a0fd0d9af866062f |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-08-18 18:31 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-08-18 18:31 +05:30 |
| Parents | ddc8b505712b |
1 file changed
modified core/indexing/chunk/code.test.ts +3 −1
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | import { ChunkWithoutID } from "../.."; |
| 2 | -import { countTokensAsync } from "../../llm/countTokens"; | |
| 2 | +import { cleanupAsyncEncoders, countTokensAsync } from "../../llm/countTokens"; | |
| 3 | 3 | import { codeChunker } from "./code"; |
| 4 | 4 | |
| 5 | 5 | async function genToArr<T>(generator: AsyncGenerator<T>): Promise<T[]> { |
| @@ -85,6 +85,8 @@ | ||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | describe("codeChunker function definition", () => { |
| 88 | + afterAll(async () => await cleanupAsyncEncoders()); | |
| 89 | + | |
| 88 | 90 | test("class methods never exceed maxChunkSize", async () => { |
| 89 | 91 | const body = Array.from( |
| 90 | 92 | { length: 200 }, |