(top)
| 85 | } |
| 86 | |
| 87 | function getCallSite(top) { |
| 88 | const originalStackFormatter = Error.prepareStackTrace; |
| 89 | Error.prepareStackTrace = (err, stack) => |
| 90 | `${stack[0].getFileName()}:${stack[0].getLineNumber()}`; |
| 91 | const err = new Error(); |
| 92 | Error.captureStackTrace(err, top); |
| 93 | // With the V8 Error API, the stack is not formatted until it is accessed |
| 94 | // eslint-disable-next-line no-unused-expressions |
| 95 | err.stack; |
| 96 | Error.prepareStackTrace = originalStackFormatter; |
| 97 | return err.stack; |
| 98 | } |
| 99 | |
| 100 | function mustNotCall(msg) { |
| 101 | const callSite = getCallSite(mustNotCall); |
no outgoing calls
no test coverage detected
searching dependent graphs…