(output, expected)
| 53 | } |
| 54 | |
| 55 | function assertProbeJson(output, expected) { |
| 56 | const normalized = typeof output === 'string' ? JSON.parse(output) : output; |
| 57 | const lastResult = normalized.results?.[normalized.results.length - 1]; |
| 58 | |
| 59 | if (isProbeSegvTeardown(lastResult)) { |
| 60 | // Log to facilitate debugging if this normalization is occurring. |
| 61 | console.log('Normalizing trailing SIGSEGV in JSON probe output'); |
| 62 | normalized.results[normalized.results.length - 1] = expected.results.at(-1); |
| 63 | } |
| 64 | |
| 65 | assert.deepStrictEqual(normalizeProbeReport(normalized), normalizeProbeReport(expected)); |
| 66 | } |
| 67 | |
| 68 | function assertProbeText(output, expected) { |
| 69 | const lineStart = findProbeSegvTeardownLine(output); |
no test coverage detected
searching dependent graphs…