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

Function getColoredMyersDiff

lib/internal/assert/assertion_error.js:111–123  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

109}
110
111function getColoredMyersDiff(actual, expected) {
112 const header = `${colors.green}actual${colors.white} ${colors.red}expected${colors.white}`;
113 const skipped = false;
114
115 const diff = myersDiff(StringPrototypeSplit(actual, ''), StringPrototypeSplit(expected, ''));
116 let message = printSimpleMyersDiff(diff);
117
118 if (skipped) {
119 message += '...';
120 }
121
122 return { message, header, skipped };
123}
124
125function getStackedDiff(actual, expected) {
126 const isStringComparison = typeof actual === 'string' && typeof expected === 'string';

Callers 1

getSimpleDiffFunction · 0.85

Calls 2

myersDiffFunction · 0.85
printSimpleMyersDiffFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…