(status)
| 19 | } |
| 20 | |
| 21 | function normalizeStatus(status) { |
| 22 | const text = String(status || '').toLowerCase(); |
| 23 | if (text === 'completed' || text === 'pass') return { cls: 'completed', text: '通过' }; |
| 24 | if (text === 'running') return { cls: 'running', text: '运行中' }; |
| 25 | if (text === 'pending') return { cls: 'pending', text: '等待中' }; |
| 26 | if (text === 'warn') return { cls: 'warning', text: '警告' }; |
| 27 | if (text === 'fail' || text === 'failed') return { cls: 'failed', text: '失败' }; |
| 28 | if (text === 'skip') return { cls: 'disabled', text: '跳过' }; |
| 29 | return { cls: 'disabled', text: text || '-' }; |
| 30 | } |
| 31 | |
| 32 | function statusBadge(status) { |
| 33 | const normalized = normalizeStatus(status); |
no outgoing calls
no test coverage detected