MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getCoverageTable

Function getCoverageTable

site/ui/Readme.tsx:65–89  ·  view source on GitHub ↗
(coverage: any)

Source from the content-addressed store, hash-verified

63 </table>`;
64
65const getCoverageTable = (coverage: any) =>
66 `<table class='fixed'>
67 <tr>
68 <th width='30%'>&nbsp;</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
91const getGitHubAvatar = (username: string) =>
92 `<a href='https://github.com/${username}' target='_blank'><img

Callers 1

useReadmeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…