(coverage: any)
| 63 | </table>`; |
| 64 | |
| 65 | const getCoverageTable = (coverage: any) => |
| 66 | `<table class='fixed'> |
| 67 | <tr> |
| 68 | <th width='30%'> </th> |
| 69 | <th>Total</th> |
| 70 | <th>Tested</th> |
| 71 | <th>Coverage</th> |
| 72 | </tr> |
| 73 | ${['lines', 'statements', 'functions', 'branches', 'tests', 'assertions'] |
| 74 | .map((type, t) => { |
| 75 | return `<tr> |
| 76 | <th class='right'>${ |
| 77 | t < 4 ? 'Tested ' + type : type[0].toUpperCase() + type.slice(1) |
| 78 | }</th> |
| 79 | ${ |
| 80 | typeof coverage[type] == 'object' |
| 81 | ? `<td>${coverage[type].total.toLocaleString()}</td> |
| 82 | <td>${coverage[type].covered.toLocaleString()}</td> |
| 83 | <td>${coverage[type].pct.toFixed(1)}%</td>` |
| 84 | : `<td colSpan='3'>${coverage[type].toLocaleString()}</td>` |
| 85 | } |
| 86 | </tr>`; |
| 87 | }) |
| 88 | .join('')} |
| 89 | </table>`; |
| 90 | |
| 91 | const getGitHubAvatar = (username: string) => |
| 92 | `<a href='https://github.com/${username}' target='_blank'><img |
no outgoing calls
no test coverage detected
searching dependent graphs…