Add istanbul and generate ininital coverage report
This commit is contained in:
165
coverage/lcov-report/server/boot/a-extendUser.js.html
Normal file
165
coverage/lcov-report/server/boot/a-extendUser.js.html
Normal file
@@ -0,0 +1,165 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for server/boot/a-extendUser.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 low">
|
||||
<h1>Code coverage report for <span class="entity">server/boot/a-extendUser.js</span></h1>
|
||||
<h2>
|
||||
Statements: <span class="metric">34.78% <small>(8 / 23)</small></span>
|
||||
Branches: <span class="metric">0% <small>(0 / 8)</small></span>
|
||||
Functions: <span class="metric">14.29% <small>(1 / 7)</small></span>
|
||||
Lines: <span class="metric">36.36% <small>(8 / 22)</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> » a-extendUser.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
|
||||
32
|
||||
33
|
||||
34
|
||||
35
|
||||
36
|
||||
37
|
||||
38
|
||||
39
|
||||
40
|
||||
41</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-neutral"> </span>
|
||||
<span class="cline-any cline-yes">1</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </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-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-yes">1</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-yes">1</span>
|
||||
<span class="cline-any cline-no"> </span>
|
||||
<span class="cline-any cline-no"> </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-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-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-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-neutral"> </span>
|
||||
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">var Rx = require('rx');
|
||||
var debug = require('debug')('freecc:user:remote');
|
||||
|
||||
<span class="fstat-no" title="function not covered" >function destroyById(id, Model) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > return Rx.Observable.create(<span class="fstat-no" title="function not covered" >function(observer) {</span></span>
|
||||
<span class="cstat-no" title="statement not covered" > Model.destroyById(id, <span class="fstat-no" title="function not covered" >function(err) {</span></span>
|
||||
<span class="cstat-no" title="statement not covered" > if (err) { <span class="cstat-no" title="statement not covered" >return observer.onError(err); </span>}</span>
|
||||
<span class="cstat-no" title="statement not covered" > observer.onCompleted();</span>
|
||||
});
|
||||
<span class="cstat-no" title="statement not covered" > return Rx.Disposable(Rx.helpers.noop);</span>
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = function(app) {
|
||||
var User = app.models.User;
|
||||
var UserIdentity = app.models.UserIdentity;
|
||||
var UserCredential = app.models.UserCredential;
|
||||
User.observe('after delete', <span class="fstat-no" title="function not covered" >function(ctx, next) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > debug('removing user', ctx.where);</span>
|
||||
<span class="cstat-no" title="statement not covered" > var id = ctx.where && ctx.where.id ? ctx.where.id : null;</span>
|
||||
<span class="cstat-no" title="statement not covered" > if (!id) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > return next();</span>
|
||||
}
|
||||
<span class="cstat-no" title="statement not covered" > Rx.Observable.combineLatest(</span>
|
||||
destroyById(id, UserIdentity),
|
||||
destroyById(id, UserCredential),
|
||||
Rx.helpers.noop
|
||||
).subscribe(
|
||||
Rx.helpers.noop,
|
||||
<span class="fstat-no" title="function not covered" > function(err) {</span>
|
||||
<span class="cstat-no" title="statement not covered" > debug('error deleting user %s stuff', id, err);</span>
|
||||
<span class="cstat-no" title="statement not covered" > next(err);</span>
|
||||
},
|
||||
<span class="fstat-no" title="function not covered" > function() {</span>
|
||||
<span class="cstat-no" title="statement not covered" > debug('user stuff deleted for user %s', id);</span>
|
||||
<span class="cstat-no" title="statement not covered" > next();</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