Add istanbul and generate ininital coverage report
This commit is contained in:
135
coverage/lcov-report/server/boot/explorer.js.html
Normal file
135
coverage/lcov-report/server/boot/explorer.js.html
Normal file
@@ -0,0 +1,135 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for server/boot/explorer.js</title>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="../../prettify.css">
|
||||
<link rel="stylesheet" href="../../base.css">
|
||||
<style type='text/css'>
|
||||
div.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header medium">
|
||||
<h1>Code coverage report for <span class="entity">server/boot/explorer.js</span></h1>
|
||||
<h2>
|
||||
Statements: <span class="metric">56.25% <small>(9 / 16)</small></span>
|
||||
Branches: <span class="metric">25% <small>(1 / 4)</small></span>
|
||||
Functions: <span class="metric">33.33% <small>(1 / 3)</small></span>
|
||||
Lines: <span class="metric">56.25% <small>(9 / 16)</small></span>
|
||||
Ignored: <span class="metric"><span class="ignore-none">none</span></span>
|
||||
</h2>
|
||||
<div class="path"><a href="../../index.html">All files</a> » <a href="index.html">server/boot/</a> » explorer.js</div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count">1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29
|
||||
30
|
||||
31</td><td class="line-coverage"><span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">module.exports = function mountLoopBackExplorer(app) {
|
||||
<span class="missing-if-branch" title="if path not taken" >I</span>if (process.env.NODE_ENV === 'production') {
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
var explorer;
|
||||
try {
|
||||
explorer = require('loopback-explorer');
|
||||
} catch(err) {
|
||||
// Print the message only when the app was started via `app.listen()`.
|
||||
// Do not print any message when the project is used as a component.
|
||||
<span class="cstat-no" title="statement not covered" > app.once('started', <span class="fstat-no" title="function not covered" >function() {</span></span>
|
||||
<span class="cstat-no" title="statement not covered" > console.log(</span>
|
||||
'Run `npm install loopback-explorer` to enable the LoopBack explorer'
|
||||
);
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > return;</span>
|
||||
}
|
||||
|
||||
var restApiRoot = app.get('restApiRoot');
|
||||
|
||||
var explorerApp = explorer(app, { basePath: restApiRoot });
|
||||
app.use('/explorer', explorerApp);
|
||||
app.once('started', <span class="fstat-no" title="function not covered" >function() {</span>
|
||||
<span class="cstat-no" title="statement not covered" > var baseUrl = app.get('url').replace(/\/$/, '');</span>
|
||||
// express 4.x (loopback 2.x) uses `mountpath`
|
||||
// express 3.x (loopback 1.x) uses `route`
|
||||
<span class="cstat-no" title="statement not covered" > var explorerPath = explorerApp.mountpath || explorerApp.route;</span>
|
||||
<span class="cstat-no" title="statement not covered" > console.log('Browse your REST API at %s%s', baseUrl, explorerPath);</span>
|
||||
});
|
||||
};
|
||||
</pre></td></tr>
|
||||
</table></pre>
|
||||
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Jun 11 2015 21:16:17 GMT-0400 (EDT)</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user