(stdout, probeOptions)
| 1011 | } |
| 1012 | |
| 1013 | async function runProbeMode(stdout, probeOptions) { |
| 1014 | try { |
| 1015 | const session = new ProbeInspectorSession(probeOptions); |
| 1016 | const { code, report } = await session.run(); |
| 1017 | stdout.write(probeOptions.json ? |
| 1018 | `${JSONStringify(probeOptions.preview ? report : stripProbePreviews(report))}\n` : |
| 1019 | buildProbeTextReport(report)); |
| 1020 | process.exit(code); |
| 1021 | } catch (error) { |
| 1022 | if (error.childStderr) { |
| 1023 | process.stderr.write(error.childStderr); |
| 1024 | } |
| 1025 | process.stderr.write(ensureTrailingNewline(error.message)); |
| 1026 | process.exit(kGenericUserError); |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | module.exports = { |
| 1031 | parseProbeTokens, |
no test coverage detected