index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>Code coverage report for All files</title>
  5. <meta charset="utf-8">
  6. <link rel="stylesheet" href="prettify.css">
  7. <style>
  8. body, html {
  9. margin:0; padding: 0;
  10. }
  11. body {
  12. font-family: Helvetica Neue, Helvetica,Arial;
  13. font-size: 10pt;
  14. }
  15. div.header, div.footer {
  16. background: #eee;
  17. padding: 1em;
  18. }
  19. div.header {
  20. z-index: 100;
  21. position: fixed;
  22. top: 0;
  23. border-bottom: 1px solid #666;
  24. width: 100%;
  25. }
  26. div.footer {
  27. border-top: 1px solid #666;
  28. }
  29. div.body {
  30. margin-top: 10em;
  31. }
  32. div.meta {
  33. font-size: 90%;
  34. text-align: center;
  35. }
  36. h1, h2, h3 {
  37. font-weight: normal;
  38. }
  39. h1 {
  40. font-size: 12pt;
  41. }
  42. h2 {
  43. font-size: 10pt;
  44. }
  45. pre {
  46. font-family: Consolas, Menlo, Monaco, monospace;
  47. margin: 0;
  48. padding: 0;
  49. line-height: 14px;
  50. font-size: 14px;
  51. -moz-tab-size: 2;
  52. -o-tab-size: 2;
  53. tab-size: 2;
  54. }
  55. div.path { font-size: 110%; }
  56. div.path a:link, div.path a:visited { color: #000; }
  57. table.coverage { border-collapse: collapse; margin:0; padding: 0 }
  58. table.coverage td {
  59. margin: 0;
  60. padding: 0;
  61. color: #111;
  62. vertical-align: top;
  63. }
  64. table.coverage td.line-count {
  65. width: 50px;
  66. text-align: right;
  67. padding-right: 5px;
  68. }
  69. table.coverage td.line-coverage {
  70. color: #777 !important;
  71. text-align: right;
  72. border-left: 1px solid #666;
  73. border-right: 1px solid #666;
  74. }
  75. table.coverage td.text {
  76. }
  77. table.coverage td span.cline-any {
  78. display: inline-block;
  79. padding: 0 5px;
  80. width: 40px;
  81. }
  82. table.coverage td span.cline-neutral {
  83. background: #eee;
  84. }
  85. table.coverage td span.cline-yes {
  86. background: #b5d592;
  87. color: #999;
  88. }
  89. table.coverage td span.cline-no {
  90. background: #fc8c84;
  91. }
  92. .cstat-yes { color: #111; }
  93. .cstat-no { background: #fc8c84; color: #111; }
  94. .fstat-no { background: #ffc520; color: #111 !important; }
  95. .cbranch-no { background: yellow !important; color: #111; }
  96. .cstat-skip { background: #ddd; color: #111; }
  97. .fstat-skip { background: #ddd; color: #111 !important; }
  98. .cbranch-skip { background: #ddd !important; color: #111; }
  99. .missing-if-branch {
  100. display: inline-block;
  101. margin-right: 10px;
  102. position: relative;
  103. padding: 0 4px;
  104. background: black;
  105. color: yellow;
  106. }
  107. .skip-if-branch {
  108. display: none;
  109. margin-right: 10px;
  110. position: relative;
  111. padding: 0 4px;
  112. background: #ccc;
  113. color: white;
  114. }
  115. .missing-if-branch .typ, .skip-if-branch .typ {
  116. color: inherit !important;
  117. }
  118. .entity, .metric { font-weight: bold; }
  119. .metric { display: inline-block; border: 1px solid #333; padding: 0.3em; background: white; }
  120. .metric small { font-size: 80%; font-weight: normal; color: #666; }
  121. div.coverage-summary table { border-collapse: collapse; margin: 3em; font-size: 110%; }
  122. div.coverage-summary td, div.coverage-summary table th { margin: 0; padding: 0.25em 1em; border-top: 1px solid #666; border-bottom: 1px solid #666; }
  123. div.coverage-summary th { text-align: left; border: 1px solid #666; background: #eee; font-weight: normal; }
  124. div.coverage-summary th.file { border-right: none !important; }
  125. div.coverage-summary th.pic { border-left: none !important; text-align: right; }
  126. div.coverage-summary th.pct { border-right: none !important; }
  127. div.coverage-summary th.abs { border-left: none !important; text-align: right; }
  128. div.coverage-summary td.pct { text-align: right; border-left: 1px solid #666; }
  129. div.coverage-summary td.abs { text-align: right; font-size: 90%; color: #444; border-right: 1px solid #666; }
  130. div.coverage-summary td.file { text-align: right; border-left: 1px solid #666; white-space: nowrap; }
  131. div.coverage-summary td.pic { min-width: 120px !important; }
  132. div.coverage-summary a:link { text-decoration: none; color: #000; }
  133. div.coverage-summary a:visited { text-decoration: none; color: #333; }
  134. div.coverage-summary a:hover { text-decoration: underline; }
  135. div.coverage-summary tfoot td { border-top: 1px solid #666; }
  136. div.coverage-summary .yui3-datatable-sort-indicator, div.coverage-summary .dummy-sort-indicator {
  137. height: 10px;
  138. width: 7px;
  139. display: inline-block;
  140. margin-left: 0.5em;
  141. }
  142. div.coverage-summary .yui3-datatable-sort-indicator {
  143. background: url("https://yui-s.yahooapis.com/3.6.0/build/datatable-sort/assets/skins/sam/sort-arrow-sprite.png") no-repeat scroll 0 0 transparent;
  144. }
  145. div.coverage-summary .yui3-datatable-sorted .yui3-datatable-sort-indicator {
  146. background-position: 0 -20px;
  147. }
  148. div.coverage-summary .yui3-datatable-sorted-desc .yui3-datatable-sort-indicator {
  149. background-position: 0 -10px;
  150. }
  151. .high { background: #b5d592 !important; }
  152. .medium { background: #ffe87c !important; }
  153. .low { background: #fc8c84 !important; }
  154. span.cover-fill, span.cover-empty {
  155. display:inline-block;
  156. border:1px solid #444;
  157. background: white;
  158. height: 12px;
  159. }
  160. span.cover-fill {
  161. background: #ccc;
  162. border-right: 1px solid #444;
  163. }
  164. span.cover-empty {
  165. background: white;
  166. border-left: none;
  167. }
  168. span.cover-full {
  169. border-right: none !important;
  170. }
  171. pre.prettyprint {
  172. border: none !important;
  173. padding: 0 !important;
  174. margin: 0 !important;
  175. }
  176. .com { color: #999 !important; }
  177. .ignore-none { color: #999; font-weight: normal; }
  178. </style>
  179. </head>
  180. <body>
  181. <div class="header medium">
  182. <h1>Code coverage report for <span class="entity">All files</span></h1>
  183. <h2>
  184. Statements: <span class="metric">72.46% <small>(171 / 236)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  185. Branches: <span class="metric">31.33% <small>(26 / 83)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  186. Functions: <span class="metric">62% <small>(31 / 50)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  187. Lines: <span class="metric">74.66% <small>(165 / 221)</small></span> &nbsp;&nbsp;&nbsp;&nbsp;
  188. Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp;
  189. </h2>
  190. <div class="path"></div>
  191. </div>
  192. <div class="body">
  193. <div class="coverage-summary">
  194. <table>
  195. <thead>
  196. <tr>
  197. <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
  198. <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
  199. <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
  200. <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
  201. <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
  202. <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
  203. <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
  204. <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
  205. <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
  206. <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
  207. </tr>
  208. </thead>
  209. <tbody><tr>
  210. <td class="file high" data-value="lib/"><a href="lib/index.html">lib/</a></td>
  211. <td data-value="100" class="pic high"><span class="cover-fill cover-full" style="width: 100px;"></span><span class="cover-empty" style="width:0px;"></span></td>
  212. <td data-value="100" class="pct high">100%</td>
  213. <td data-value="37" class="abs high">(37&nbsp;/&nbsp;37)</td>
  214. <td data-value="70" class="pct medium">70%</td>
  215. <td data-value="10" class="abs medium">(7&nbsp;/&nbsp;10)</td>
  216. <td data-value="100" class="pct high">100%</td>
  217. <td data-value="7" class="abs high">(7&nbsp;/&nbsp;7)</td>
  218. <td data-value="100" class="pct high">100%</td>
  219. <td data-value="35" class="abs high">(35&nbsp;/&nbsp;35)</td>
  220. </tr>
  221. <tr>
  222. <td class="file medium" data-value="lib/socket.io/"><a href="lib/socket.io/index.html">lib/socket.io/</a></td>
  223. <td data-value="67.34" class="pic medium"><span class="cover-fill" style="width: 67px;"></span><span class="cover-empty" style="width:33px;"></span></td>
  224. <td data-value="67.34" class="pct medium">67.34%</td>
  225. <td data-value="199" class="abs medium">(134&nbsp;/&nbsp;199)</td>
  226. <td data-value="26.03" class="pct low">26.03%</td>
  227. <td data-value="73" class="abs low">(19&nbsp;/&nbsp;73)</td>
  228. <td data-value="55.81" class="pct medium">55.81%</td>
  229. <td data-value="43" class="abs medium">(24&nbsp;/&nbsp;43)</td>
  230. <td data-value="69.89" class="pct medium">69.89%</td>
  231. <td data-value="186" class="abs medium">(130&nbsp;/&nbsp;186)</td>
  232. </tr>
  233. </tbody>
  234. </table>
  235. </div>
  236. </div>
  237. <div class="footer">
  238. <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed Dec 31 2014 17:39:16 GMT+0800 (CST)</div>
  239. </div>
  240. <script src="prettify.js"></script>
  241. <script src="https://yui-s.yahooapis.com/3.6.0/build/yui/yui-min.js"></script>
  242. <script>
  243. YUI().use('datatable', function (Y) {
  244. var formatters = {
  245. pct: function (o) {
  246. o.className += o.record.get('classes')[o.column.key];
  247. try {
  248. return o.value.toFixed(2) + '%';
  249. } catch (ex) { return o.value + '%'; }
  250. },
  251. html: function (o) {
  252. o.className += o.record.get('classes')[o.column.key];
  253. return o.record.get(o.column.key + '_html');
  254. }
  255. },
  256. defaultFormatter = function (o) {
  257. o.className += o.record.get('classes')[o.column.key];
  258. return o.value;
  259. };
  260. function getColumns(theadNode) {
  261. var colNodes = theadNode.all('tr th'),
  262. cols = [],
  263. col;
  264. colNodes.each(function (colNode) {
  265. col = {
  266. key: colNode.getAttribute('data-col'),
  267. label: colNode.get('innerHTML') || ' ',
  268. sortable: !colNode.getAttribute('data-nosort'),
  269. className: colNode.getAttribute('class'),
  270. type: colNode.getAttribute('data-type'),
  271. allowHTML: colNode.getAttribute('data-html') === 'true' || colNode.getAttribute('data-fmt') === 'html'
  272. };
  273. col.formatter = formatters[colNode.getAttribute('data-fmt')] || defaultFormatter;
  274. cols.push(col);
  275. });
  276. return cols;
  277. }
  278. function getRowData(trNode, cols) {
  279. var tdNodes = trNode.all('td'),
  280. i,
  281. row = { classes: {} },
  282. node,
  283. name;
  284. for (i = 0; i < cols.length; i += 1) {
  285. name = cols[i].key;
  286. node = tdNodes.item(i);
  287. row[name] = node.getAttribute('data-value') || node.get('innerHTML');
  288. row[name + '_html'] = node.get('innerHTML');
  289. row.classes[name] = node.getAttribute('class');
  290. //Y.log('Name: ' + name + '; Value: ' + row[name]);
  291. if (cols[i].type === 'number') { row[name] = row[name] * 1; }
  292. }
  293. //Y.log(row);
  294. return row;
  295. }
  296. function getData(tbodyNode, cols) {
  297. var data = [];
  298. tbodyNode.all('tr').each(function (trNode) {
  299. data.push(getRowData(trNode, cols));
  300. });
  301. return data;
  302. }
  303. function replaceTable(node) {
  304. if (!node) { return; }
  305. var cols = getColumns(node.one('thead')),
  306. data = getData(node.one('tbody'), cols),
  307. table,
  308. parent = node.get('parentNode');
  309. table = new Y.DataTable({
  310. columns: cols,
  311. data: data,
  312. sortBy: 'file'
  313. });
  314. parent.set('innerHTML', '');
  315. table.render(parent);
  316. }
  317. Y.on('domready', function () {
  318. replaceTable(Y.one('div.coverage-summary table'));
  319. if (typeof prettyPrint === 'function') {
  320. prettyPrint();
  321. }
  322. });
  323. });
  324. </script>
  325. </body>
  326. </html>