( simulator: SimulatorMetadata, artifact: "Recording" | "Screenshot", )
| 324 | } |
| 325 | |
| 326 | function captureFileBaseName( |
| 327 | simulator: SimulatorMetadata, |
| 328 | artifact: "Recording" | "Screenshot", |
| 329 | ): string { |
| 330 | const safeName = simulator.name.replace(/[^A-Za-z0-9._-]+/g, "-"); |
| 331 | return `SimDeck ${artifact} - ${safeName || simulator.udid}`; |
| 332 | } |
| 333 | |
| 334 | function formatElapsedRecordingTime(startedAt: number, now: number): string { |
| 335 | const elapsedSeconds = Math.max(0, Math.floor((now - startedAt) / 1000)); |
no test coverage detected