This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recursiveDiff(expected, actual, parentNodeStr) { | |
let isObject = expected !== null && typeof expected === 'object'; | |
isObject = isObject && (actual !== null && typeof actual === 'object'); | |
if (isObject) { | |
// eslint-disable-next-line no-restricted-syntax | |
for (const key in actual) { | |
if (Object.prototype.hasOwnProperty.call(actual, key)) { | |
const keyStr = `${parentNodeStr}.${key}`; | |
// eslint-disable-next-line no-prototype-builtins |