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

Function expectBatchError

packages/cli/src/commands/batchRender.test.ts:37–48  ·  view source on GitHub ↗
(fn: () => unknown, title: string)

Source from the content-addressed store, hash-verified

35}
36
37function expectBatchError(fn: () => unknown, title: string): BatchRenderInputError {
38 try {
39 fn();
40 } catch (error: unknown) {
41 expect(error).toBeInstanceOf(BatchRenderInputError);
42 if (error instanceof BatchRenderInputError) {
43 expect(error.title).toBe(title);
44 return error;
45 }
46 }
47 throw new Error("Expected BatchRenderInputError");
48}
49
50function eventType(value: unknown): string | undefined {
51 if (value === null || typeof value !== "object" || Array.isArray(value)) return undefined;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected