MCPcopy
hub / github.com/qawolf/cli / makeJsonUi

Function makeJsonUi

src/domains/flows/pull/handler.test.ts:36–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34// makeFakeUI's stub resolves to []; we need the inner tasks to execute so
35// the handler reaches its JSON-output branch with real result data.
36function makeJsonUi(): UI {
37 const ui = makeFakeUI();
38 const withProgress = async (
39 steps: readonly { task: () => Promise<unknown> }[],
40 ): Promise<unknown[]> => {
41 const results: unknown[] = [];
42 for (const step of steps) {
43 results.push(await step.task());
44 }
45 return results;
46 };
47 return {
48 ...ui,
49 mode: "json",
50 withProgress: withProgress as unknown as UI["withProgress"],
51 };
52}
53
54const noopSignals = makeNoopSignals();
55

Callers 1

handler.test.tsFile · 0.85

Calls 1

makeFakeUIFunction · 0.85

Tested by

no test coverage detected