(text: string)
| 138 | } |
| 139 | |
| 140 | function trimVolatileDebugStackPrefix(text: string): string { |
| 141 | const lines = text.split('\n'); |
| 142 | const framesIndex = lines.findIndex((line) => line.trim() === 'Frames:'); |
| 143 | if (framesIndex === -1) { |
| 144 | return text; |
| 145 | } |
| 146 | |
| 147 | const threadIndex = lines.findIndex( |
| 148 | (line, index) => index > framesIndex && line.trim().startsWith('Thread <THREAD_ID>'), |
| 149 | ); |
| 150 | if (threadIndex === -1) { |
| 151 | return text; |
| 152 | } |
| 153 | |
| 154 | const firstAppFrameIndex = lines.findIndex( |
| 155 | (line, index) => index > threadIndex && line.includes('<SIM_APP_BUNDLE>/'), |
| 156 | ); |
| 157 | if (firstAppFrameIndex === -1) { |
| 158 | return text; |
| 159 | } |
| 160 | |
| 161 | const stableLaunchBoundaryIndex = lines.findIndex( |
| 162 | (line, index) => |
| 163 | index > threadIndex && |
| 164 | index < firstAppFrameIndex && |
| 165 | line.includes('GraphicsServices.framework/GraphicsServices'), |
| 166 | ); |
| 167 | if (stableLaunchBoundaryIndex <= threadIndex + 1) { |
| 168 | return text; |
| 169 | } |
| 170 | |
| 171 | lines.splice(threadIndex + 1, stableLaunchBoundaryIndex - threadIndex - 1); |
| 172 | return lines.join('\n'); |
| 173 | } |
| 174 | |
| 175 | function normalizeSimulatorFailureTestProgressBlock(match: string): string { |
| 176 | const progress = match.trimEnd().split('\n').map(parseTestProgressLine); |
no outgoing calls
no test coverage detected