(config: DebugInfoConfig, original)
| 88 | } |
| 89 | |
| 90 | function normalizeDebugInfo(config: DebugInfoConfig, original) { |
| 91 | const {debugTask, debugStack, debugLocation, ...debugInfo} = original; |
| 92 | if (original.owner) { |
| 93 | debugInfo.owner = normalizeDebugInfo(config, original.owner); |
| 94 | } |
| 95 | if (original.awaited) { |
| 96 | debugInfo.awaited = normalizeIOInfo(config, original.awaited); |
| 97 | } |
| 98 | if (debugInfo.props && config.ignoreProps) { |
| 99 | debugInfo.props = {}; |
| 100 | } |
| 101 | if (Array.isArray(debugInfo.stack)) { |
| 102 | debugInfo.stack = config.useV8Stack |
| 103 | ? formatV8Stack(debugInfo.stack) |
| 104 | : normalizeStack(debugInfo.stack); |
| 105 | return debugInfo; |
| 106 | } else if (typeof debugInfo.time === 'number' && config.useFixedTime) { |
| 107 | return {...debugInfo, time: 0}; |
| 108 | } else { |
| 109 | return debugInfo; |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | export function getDebugInfo(config: DebugInfoConfig, obj) { |
| 114 | const debugInfo = obj._debugInfo; |
no test coverage detected