MCPcopy Index your code
hub / github.com/nodejs/node / assertProbeJson

Function assertProbeJson

test/common/debugger-probe.js:55–66  ·  view source on GitHub ↗
(output, expected)

Source from the content-addressed store, hash-verified

53}
54
55function 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
68function assertProbeText(output, expected) {
69 const lineStart = findProbeSegvTeardownLine(output);

Callers 15

stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85
stdoutFunction · 0.85

Calls 5

isProbeSegvTeardownFunction · 0.85
normalizeProbeReportFunction · 0.85
parseMethod · 0.65
logMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…