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

Function expectErr

packages/cli/src/utils/variables.test.ts:10–15  ·  view source on GitHub ↗
(
    result: import("./variables.js").VariablesParseResult,
  )

Source from the content-addressed store, hash-verified

8 });
9
10 function expectErr<T extends { kind: string }>(
11 result: import("./variables.js").VariablesParseResult,
12 ): T {
13 if (result.ok) throw new Error(`expected error, got ${JSON.stringify(result.value)}`);
14 return result.error as T;
15 }
16
17 it("returns undefined when neither flag is set", () => {
18 expect(parseVariablesArg(undefined, undefined)).toEqual({ ok: true, value: undefined });

Callers 1

variables.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected