MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / stubClient

Function stubClient

packages/cli/src/cloud/poll.test.ts:22–31  ·  view source on GitHub ↗

Build a stub client that returns the supplied details in order.

(details: HyperframesRenderDetail[])

Source from the content-addressed store, hash-verified

20
21/** Build a stub client that returns the supplied details in order. */
22function stubClient(details: HyperframesRenderDetail[]): HyperframesCloudClient {
23 const stack = [...details];
24 return {
25 async getRender() {
26 const next = stack.shift();
27 if (!next) throw new Error("ran out of stubbed responses");
28 return next;
29 },
30 } as unknown as HyperframesCloudClient;
31}
32
33describe("cloud/poll", () => {
34 describe("isTerminal", () => {

Callers 1

poll.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected