(checks)
| 1859 | (value === 'ok' || value === 'fail' || value === 'skipped' || value === 'unknown') ? value : 'unknown'; |
| 1860 | |
| 1861 | const normalizeTestChecks = (checks) => { |
| 1862 | if (!Array.isArray(checks)) return []; |
| 1863 | return checks |
| 1864 | .filter((check) => check && typeof check === 'object') |
| 1865 | .map((check) => ({ |
| 1866 | key: String(check.key || '').trim(), |
| 1867 | label: String(check.label || check.key || '').trim(), |
| 1868 | state: normalizeCheckState(check.state), |
| 1869 | message: String(check.message || '').trim(), |
| 1870 | })) |
| 1871 | .filter((check) => check.key !== ''); |
| 1872 | }; |
| 1873 | |
| 1874 | const truncateTestMessage = (msg, max = 80) => { |
| 1875 | const clean = String(msg || '').replace(/\s+/g, ' ').trim(); |
no test coverage detected