(actual, expected, operator)
| 92 | } |
| 93 | |
| 94 | function checkOperator(actual, expected, operator) { |
| 95 | // In case both values are objects or functions explicitly mark them as not |
| 96 | // reference equal for the `strictEqual` operator. |
| 97 | if ( |
| 98 | operator === 'strictEqual' && |
| 99 | ((typeof actual === 'object' && |
| 100 | actual !== null && |
| 101 | typeof expected === 'object' && |
| 102 | expected !== null) || |
| 103 | (typeof actual === 'function' && typeof expected === 'function')) |
| 104 | ) { |
| 105 | operator = 'strictEqualObject'; |
| 106 | } |
| 107 | |
| 108 | return operator; |
| 109 | } |
| 110 | |
| 111 | function getColoredMyersDiff(actual, expected) { |
| 112 | const header = `${colors.green}actual${colors.white} ${colors.red}expected${colors.white}`; |
no outgoing calls
no test coverage detected
searching dependent graphs…