(source)
| 49 | .add('partialDeepStrictEqual'); |
| 50 | |
| 51 | function copyError(source) { |
| 52 | const target = ObjectAssign( |
| 53 | { __proto__: ObjectGetPrototypeOf(source) }, |
| 54 | source, |
| 55 | ); |
| 56 | ObjectDefineProperty(target, 'message', { |
| 57 | __proto__: null, |
| 58 | value: source.message, |
| 59 | }); |
| 60 | if (ObjectPrototypeHasOwnProperty(source, 'cause')) { |
| 61 | let { cause } = source; |
| 62 | |
| 63 | if (isError(cause)) { |
| 64 | cause = copyError(cause); |
| 65 | } |
| 66 | |
| 67 | ObjectDefineProperty(target, 'cause', { __proto__: null, value: cause }); |
| 68 | } |
| 69 | return target; |
| 70 | } |
| 71 | |
| 72 | function inspectValue(val) { |
| 73 | // The util.inspect default values could be changed. This makes sure the |
no test coverage detected
searching dependent graphs…