MCPcopy
hub / github.com/callstack/agent-device / renderReplayTestResponse

Function renderReplayTestResponse

src/replay/test/reporting.ts:28–46  ·  view source on GitHub ↗
(options: {
  suite: ReplaySuiteResult;
  json?: boolean;
  debug?: boolean;
  verbose?: boolean;
  reporter?: string[];
  reportJunit?: string;
  reporterRuntime?: ReplayTestReporterRuntime;
})

Source from the content-addressed store, hash-verified

26};
27
28export async function renderReplayTestResponse(options: {
29 suite: ReplaySuiteResult;
30 json?: boolean;
31 debug?: boolean;
32 verbose?: boolean;
33 reporter?: string[];
34 reportJunit?: string;
35 reporterRuntime?: ReplayTestReporterRuntime;
36}): Promise<number> {
37 const { suite, json, debug, verbose, reporter, reportJunit } = options;
38 const runtime =
39 options.reporterRuntime ??
40 (await createReplayTestReporterRuntime({ debug, verbose, reporter, reportJunit, json }));
41 await runReplayTestReporters(runtime.reporters, suite, runtime.context);
42 if (json) {
43 printJson({ success: true, data: suite });
44 }
45 return getReplayTestReporterExitCode(runtime.reporters, suite);
46}
47
48export async function createReplayTestReporterRuntime(options: {
49 debug?: boolean;

Callers 1

writeGenericCliOutputFunction · 0.90

Calls 4

runReplayTestReportersFunction · 0.90
printJsonFunction · 0.90

Tested by

no test coverage detected