(
command: ClientBackedCliCommandName,
flags: CliFlags,
data: CommandRequestResult,
options: Pick<ClientCommandParams, 'debug' | 'replayTestReporterRuntime'> = {},
)
| 48 | } |
| 49 | |
| 50 | function writeGenericCliOutput( |
| 51 | command: ClientBackedCliCommandName, |
| 52 | flags: CliFlags, |
| 53 | data: CommandRequestResult, |
| 54 | options: Pick<ClientCommandParams, 'debug' | 'replayTestReporterRuntime'> = {}, |
| 55 | ): Promise<number> | number { |
| 56 | if (command === 'test') { |
| 57 | return renderReplayTestResponse({ |
| 58 | suite: data as ReplaySuiteResult, |
| 59 | debug: options.debug, |
| 60 | verbose: flags.verbose, |
| 61 | json: flags.json, |
| 62 | reporter: flags.reporter, |
| 63 | reportJunit: flags.reportJunit, |
| 64 | reporterRuntime: options.replayTestReporterRuntime, |
| 65 | }); |
| 66 | } |
| 67 | writeCommandOutput(flags, data, () => |
| 68 | readCommandMessage(data as Record<string, unknown> | undefined), |
| 69 | ); |
| 70 | return 0; |
| 71 | } |
| 72 | |
| 73 | function writeCliOutput(flags: CliFlags, output: CliOutput): void { |
| 74 | if (!flags.json && output.stderr) { |
no test coverage detected