MCPcopy Create free account
hub / github.com/continuedev/continue / streamToString

Function streamToString

core/autocomplete/generation/utils.vitest.ts:19–27  ·  view source on GitHub ↗
(
    stream: AsyncGenerator<string>,
  )

Source from the content-addressed store, hash-verified

17 }
18
19 async function streamToString(
20 stream: AsyncGenerator<string>,
21 ): Promise<string> {
22 let result = "";
23 for await (const chunk of stream) {
24 result += chunk;
25 }
26 return result;
27 }
28
29 it("should yield all chunks when maxTimeMs is not reached", async () => {
30 const mockStream = createMockStream(["Hello", " world", "!"]);

Callers 1

utils.vitest.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected