smartfile/coverage/lcov-report/smartfile/index.js.html
2016-02-09 20:51:13 +01:00

435 lines
13 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for smartfile/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">smartfile/</a> index.js
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">92.31% </span>
<span class="quiet">Statements</span>
<span class='fraction'>60/65</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">80.95% </span>
<span class="quiet">Branches</span>
<span class='fraction'>17/21</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">94.12% </span>
<span class="quiet">Functions</span>
<span class='fraction'>16/17</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">92.06% </span>
<span class="quiet">Lines</span>
<span class='fraction'>58/63</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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&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>
<span class="cline-any cline-neutral">&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>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</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>
<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">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">3×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</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>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</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>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-yes">2×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</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-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">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</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>
<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">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-yes">1×</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>
<span class="cline-any cline-neutral">&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>
<span class="cline-any cline-neutral">&nbsp;</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-yes">1×</span>
<span class="cline-any cline-yes">1×</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">#!/usr/bin/env node
&nbsp;
/// &lt;reference path="./index.ts" /&gt;
var SmartfilePlugins;
(function (SmartfilePlugins) {
SmartfilePlugins.init = function () {
var plugins = {
beautylog: require("beautylog"),
fs: require("fs-extra"),
path: require("path"),
q: require("q"),
vinyl: require("vinyl"),
vinylFile: require("vinyl-file"),
yaml: require("js-yaml"),
requireReload: require("require-reload")
};
return plugins;
};
})(SmartfilePlugins || (SmartfilePlugins = {}));
/// &lt;reference path="./index.ts" /&gt;
var SmartfileCheck;
(function (SmartfileCheck) {
var checks = {
fileExistsSync: function (filePath) {
var fileExistsBool = false;
try {
plugins.fs.readFileSync(filePath);
fileExistsBool = true;
}
catch (err) {
fileExistsBool = false;
}
return fileExistsBool;
},
fileExists: function (filePath) {
var done = plugins.q.defer();
plugins.fs.access(filePath, plugins.fs.R_OK, function (err) {
err ? done.reject() : done.resolve();
});
return done.promise;
}
};
SmartfileCheck.init = function (objectArg) {
objectArg.checks = checks;
};
})(SmartfileCheck || (SmartfileCheck = {}));
/// &lt;reference path="./index.ts" /&gt;
var SmartfileSimple;
(function (SmartfileSimple) {
/**
* reads a file content to a String
* @param filePath
* @returns {string|Buffer|any}
*/
var readFileToString = function (filePath) {
var fileString;
fileString = plugins.fs.readFileSync(filePath, "utf8");
return fileString;
};
var readFileToObject = function (filePath, fileTypeArg) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (fileTypeArg === void 0) { fileTypeArg = "undefined"; }
var fileType;
<span class="missing-if-branch" title="else path not taken" >E</span>if (fileTypeArg == "undefined") {
fileType = plugins.path.extname(filePath);
}
else {
<span class="cstat-no" title="statement not covered" > fileType = fileTypeArg;</span>
}
fileType = fileType.replace(/\.([a-z]*)/, "$1"); //remove . form fileType
switch (fileType) {
<span class="branch-0 cbranch-no" title="branch not covered" > case "yml":</span>
case "yaml":
try {
return plugins.yaml.safeLoad(plugins.fs.readFileSync(filePath, 'utf8'));
}
catch (e) {
<span class="cstat-no" title="statement not covered" > plugins.beautylog.error("check that " + filePath.blue + " points to a valid file");</span>
}
<span class="cstat-no" title="statement not covered" > break;</span>
case "json":
return plugins.fs.readJsonSync(filePath, {});
<span class="cstat-no" title="statement not covered" > break;</span>
}
};
SmartfileSimple.init = function (objectArg) {
objectArg.readFileToString = readFileToString;
objectArg.readFileToObject = readFileToObject;
};
})(SmartfileSimple || (SmartfileSimple = {}));
/// &lt;reference path="./index.ts" /&gt;
var SmartfileVinyl;
(function (SmartfileVinyl) {
var readFileToVinyl = function (filePathArg, options) {
<span class="missing-if-branch" title="else path not taken" >E</span>if (options === void 0) { options = {}; }
return plugins.vinylFile.readSync(filePathArg, options);
};
SmartfileVinyl.init = function (objectArg) {
objectArg.readFileToVinyl = readFileToVinyl;
};
})(SmartfileVinyl || (SmartfileVinyl = {}));
/// &lt;reference path="./index.ts" /&gt;
var SmartfileRequire;
(function (SmartfileRequire) {
var requireReload = <span class="fstat-no" title="function not covered" >function (path) {</span>
<span class="cstat-no" title="statement not covered" > return plugins.requireReload(path);</span>
};
SmartfileRequire.init = function (objectArg) {
objectArg.requireReload = requireReload;
};
})(SmartfileRequire || (SmartfileRequire = {}));
/// &lt;reference path="./typings/main.d.ts" /&gt;
/// &lt;reference path="./smartfile.plugins.ts" /&gt;
/// &lt;reference path="./smartfile.check.ts" /&gt;
/// &lt;reference path="./smartfile.simple.ts" /&gt;
/// &lt;reference path="./smartfile.vinyl.ts" /&gt;
/// &lt;reference path="./smartfile.require.ts" /&gt;
var plugins = SmartfilePlugins.init();
var smartfile = {};
SmartfileCheck.init(smartfile);
SmartfileSimple.init(smartfile);
SmartfileVinyl.init(smartfile);
SmartfileRequire.init(smartfile);
module.exports = smartfile;
&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="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Feb 09 2016 20:50:58 GMT+0100 (CET)
</div>
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../sorter.js"></script>
</body>
</html>