(error)
| 65 | }; |
| 66 | |
| 67 | function normaliseError(error) { |
| 68 | if (!error) { |
| 69 | throw new Error(`Expected an error but got ${JSON.stringify(error)}`); |
| 70 | } |
| 71 | const clone = { ...error, message: error.message }; |
| 72 | delete clone.stack; |
| 73 | delete clone.toString; |
| 74 | if (clone.watchFiles) { |
| 75 | clone.watchFiles.sort(); |
| 76 | } |
| 77 | if (clone.frame) { |
| 78 | clone.frame = clone.frame.replace(/\s+$/gm, ''); |
| 79 | } |
| 80 | if (clone.cause) { |
| 81 | clone.cause = normaliseError(clone.cause); |
| 82 | } |
| 83 | return clone; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * @param {RollupError} actual |
no outgoing calls
no test coverage detected
searching dependent graphs…