UNPKG

@coding-blocks/jsonapi-server

Version:

A config driven NodeJS framework implementing json:api

114 lines (113 loc) 3.72 kB
<!doctype html> <html lang="en"> <head> <title>Code coverage report for lib/routes/index.js</title> <meta charset="utf-8" /> <link rel="stylesheet" href="../../prettify.css" /> <link rel="stylesheet" href="../../base.css" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <style type='text/css'> .coverage-summary .sorter { background-image: url(../../sort-arrow-sprite.png); } </style> </head> <body> <div class='wrapper'> <div class='pad1'> <h1> <a href="../../index.html">All files</a> / <a href="index.html">lib/routes</a> index.js </h1> <div class='clearfix'> <div class='fl pad1y space-right2'> <span class="strong">80% </span> <span class="quiet">Statements</span> <span class='fraction'>8/10</span> </div> <div class='fl pad1y space-right2'> <span class="strong">100% </span> <span class="quiet">Branches</span> <span class='fraction'>3/3</span> </div> <div class='fl pad1y space-right2'> <span class="strong">66.67% </span> <span class="quiet">Functions</span> <span class='fraction'>2/3</span> </div> <div class='fl pad1y space-right2'> <span class="strong">77.78% </span> <span class="quiet">Lines</span> <span class='fraction'>7/9</span> </div> </div> </div> <div class='status-line high'></div> <pre><table class="coverage"> <tr><td class="line-count quiet">1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-yes">16x</span> <span class="cline-any cline-yes">14x</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1x</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict' const routes = module.exports = { } &nbsp; const fs = require('fs') const path = require('path') &nbsp; routes.handlers = { } fs.readdirSync(__dirname).filter(filename =&gt; /\.js$/.test(filename) &amp;&amp; (filename !== 'index.js') &amp;&amp; (filename !== 'helper.js')).sort().forEach(filename =&gt; { routes.handlers[filename] = require(path.join(__dirname, filename)) }) &nbsp; routes.register = <span class="fstat-no" title="function not covered" >()</span> =&gt; { <span class="cstat-no" title="statement not covered" > for (const i in routes.handlers) {</span> <span class="cstat-no" title="statement not covered" > routes.handlers[i].register()</span> } } &nbsp;</pre></td></tr> </table></pre> <div class='push'></div><!-- for sticky footer --> </div><!-- /wrapper --> <div class='footer quiet pad2 space-top1 center small'> Code coverage generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Sat Jan 27 2018 19:59:16 GMT+0530 (IST) </div> </div> <script src="../../prettify.js"></script> <script> window.onload = function () { if (typeof prettyPrint === 'function') { prettyPrint(); } }; </script> <script src="../../sorter.js"></script> </body> </html>