(ms)
| 50 | }) |
| 51 | |
| 52 | function formatDuration(ms) { |
| 53 | if (ms < 1000) { |
| 54 | return `${ms}ms` |
| 55 | } |
| 56 | |
| 57 | const totalSeconds = Math.round(ms / 1000) |
| 58 | const minutes = Math.floor(totalSeconds / 60) |
| 59 | const seconds = totalSeconds % 60 |
| 60 | |
| 61 | if (minutes === 0) { |
| 62 | return `${seconds}s` |
| 63 | } |
| 64 | |
| 65 | return `${minutes}m ${seconds}s` |
| 66 | } |
| 67 | |
| 68 | function logSeries(message) { |
| 69 | const elapsedMs = Date.now() - seriesStartedAt |
no outgoing calls
no test coverage detected