Fix diff building when only one side has a custom object formatter

Fixes #2061
This commit is contained in:
Steve Gravrock
2025-06-04 18:04:40 -07:00
parent e15819c0dd
commit 0183acc682
3 changed files with 65 additions and 2 deletions

View File

@@ -37,7 +37,10 @@ getJasmineRequireObj().DiffBuilder = function(j$) {
);
if (useCustom) {
messages.push(wrapPrettyPrinted(actualCustom, expectedCustom, path));
const prettyActual = actualCustom || this.prettyPrinter_(actual);
const prettyExpected =
expectedCustom || this.prettyPrinter_(expected);
messages.push(wrapPrettyPrinted(prettyActual, prettyExpected, path));
return false; // don't recurse further
}