Skip to content

Commit

Permalink
tests & coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Apr 26, 2020
1 parent d996105 commit 67016a1
Show file tree
Hide file tree
Showing 16 changed files with 1,121 additions and 13 deletions.
62 changes: 62 additions & 0 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1587906497977" clover="3.2.0">
<project timestamp="1587906497977" name="All files">
<metrics statements="53" coveredstatements="53" conditionals="35" coveredconditionals="34" methods="11" coveredmethods="11" elements="99" coveredelements="98" complexity="0" loc="53" ncloc="53" packages="1" files="1" classes="1"/>
<file name="index.js" path="C:\projects\elapsed-time-logger\lib\index.js">
<metrics statements="53" coveredstatements="53" conditionals="35" coveredconditionals="34" methods="11" coveredmethods="11"/>
<line num="2" count="4" type="cond" truecount="3" falsecount="0"/>
<line num="3" count="4" type="cond" truecount="3" falsecount="1"/>
<line num="5" count="4" type="stmt"/>
<line num="6" count="4" type="stmt"/>
<line num="8" count="10" type="stmt"/>
<line num="10" count="4" type="stmt"/>
<line num="11" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="12" count="2" type="stmt"/>
<line num="13" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="4" type="stmt"/>
<line num="16" count="7" type="stmt"/>
<line num="17" count="7" type="stmt"/>
<line num="19" count="4" type="stmt"/>
<line num="20" count="9" type="stmt"/>
<line num="21" count="9" type="stmt"/>
<line num="22" count="9" type="stmt"/>
<line num="23" count="9" type="stmt"/>
<line num="24" count="9" type="stmt"/>
<line num="25" count="9" type="stmt"/>
<line num="26" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="27" count="1" type="stmt"/>
<line num="29" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="30" count="2" type="stmt"/>
<line num="32" count="9" type="cond" truecount="2" falsecount="0"/>
<line num="33" count="6" type="stmt"/>
<line num="35" count="9" type="cond" truecount="6" falsecount="0"/>
<line num="36" count="1" type="stmt"/>
<line num="38" count="9" type="stmt"/>
<line num="40" count="4" type="stmt"/>
<line num="42" count="4" type="stmt"/>
<line num="44" count="4" type="stmt"/>
<line num="46" count="4" type="stmt"/>
<line num="47" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="48" count="10" type="stmt"/>
<line num="49" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="50" count="6" type="stmt"/>
<line num="52" count="4" type="stmt"/>
<line num="53" count="4" type="stmt"/>
<line num="55" count="4" type="stmt"/>
<line num="56" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="57" count="3" type="stmt"/>
<line num="58" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="59" count="1" type="stmt"/>
<line num="61" count="2" type="cond" truecount="2" falsecount="0"/>
<line num="62" count="2" type="stmt"/>
<line num="64" count="4" type="stmt"/>
<line num="65" count="4" type="stmt"/>
<line num="66" count="4" type="cond" truecount="2" falsecount="0"/>
<line num="67" count="1" type="stmt"/>
<line num="68" count="1" type="stmt"/>
<line num="70" count="3" type="stmt"/>
<line num="72" count="4" type="stmt"/>
<line num="74" count="4" type="stmt"/>
</file>
</project>
</coverage>
2 changes: 2 additions & 0 deletions coverage/coverage-final.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{"C:\\projects\\elapsed-time-logger\\lib\\index.js": {"path":"C:\\projects\\elapsed-time-logger\\lib\\index.js","statementMap":{"0":{"start":{"line":2,"column":22},"end":{"line":4,"column":1}},"1":{"start":{"line":3,"column":4},"end":{"line":3,"column":62}},"2":{"start":{"line":5,"column":31},"end":{"line":5,"column":81}},"3":{"start":{"line":6,"column":35},"end":{"line":41,"column":3}},"4":{"start":{"line":8,"column":8},"end":{"line":8,"column":57}},"5":{"start":{"line":10,"column":4},"end":{"line":14,"column":6}},"6":{"start":{"line":11,"column":8},"end":{"line":11,"column":null}},"7":{"start":{"line":11,"column":32},"end":{"line":11,"column":43}},"8":{"start":{"line":12,"column":26},"end":{"line":12,"column":36}},"9":{"start":{"line":13,"column":8},"end":{"line":13,"column":67}},"10":{"start":{"line":15,"column":4},"end":{"line":18,"column":6}},"11":{"start":{"line":16,"column":19},"end":{"line":16,"column":64}},"12":{"start":{"line":17,"column":8},"end":{"line":17,"column":32}},"13":{"start":{"line":19,"column":4},"end":{"line":39,"column":6}},"14":{"start":{"line":20,"column":21},"end":{"line":20,"column":23}},"15":{"start":{"line":21,"column":23},"end":{"line":21,"column":58}},"16":{"start":{"line":22,"column":17},"end":{"line":22,"column":44}},"17":{"start":{"line":23,"column":18},"end":{"line":23,"column":85}},"18":{"start":{"line":24,"column":19},"end":{"line":24,"column":60}},"19":{"start":{"line":25,"column":18},"end":{"line":25,"column":64}},"20":{"start":{"line":26,"column":8},"end":{"line":28,"column":null}},"21":{"start":{"line":27,"column":12},"end":{"line":27,"column":38}},"22":{"start":{"line":29,"column":8},"end":{"line":31,"column":null}},"23":{"start":{"line":30,"column":12},"end":{"line":30,"column":41}},"24":{"start":{"line":32,"column":8},"end":{"line":34,"column":null}},"25":{"start":{"line":33,"column":12},"end":{"line":33,"column":40}},"26":{"start":{"line":35,"column":8},"end":{"line":37,"column":null}},"27":{"start":{"line":36,"column":12},"end":{"line":36,"column":32}},"28":{"start":{"line":38,"column":8},"end":{"line":38,"column":22}},"29":{"start":{"line":40,"column":4},"end":{"line":40,"column":25}},"30":{"start":{"line":42,"column":38},"end":{"line":73,"column":3}},"31":{"start":{"line":44,"column":8},"end":{"line":44,"column":33}},"32":{"start":{"line":46,"column":4},"end":{"line":54,"column":6}},"33":{"start":{"line":47,"column":8},"end":{"line":47,"column":null}},"34":{"start":{"line":47,"column":32},"end":{"line":47,"column":45}},"35":{"start":{"line":48,"column":22},"end":{"line":48,"column":41}},"36":{"start":{"line":49,"column":8},"end":{"line":51,"column":null}},"37":{"start":{"line":50,"column":12},"end":{"line":50,"column":27}},"38":{"start":{"line":52,"column":8},"end":{"line":52,"column":41}},"39":{"start":{"line":53,"column":8},"end":{"line":53,"column":23}},"40":{"start":{"line":55,"column":4},"end":{"line":63,"column":6}},"41":{"start":{"line":56,"column":8},"end":{"line":56,"column":null}},"42":{"start":{"line":56,"column":40},"end":{"line":56,"column":61}},"43":{"start":{"line":57,"column":26},"end":{"line":57,"column":41}},"44":{"start":{"line":58,"column":8},"end":{"line":60,"column":null}},"45":{"start":{"line":59,"column":12},"end":{"line":59,"column":19}},"46":{"start":{"line":61,"column":8},"end":{"line":61,"column":66}},"47":{"start":{"line":62,"column":8},"end":{"line":62,"column":35}},"48":{"start":{"line":64,"column":4},"end":{"line":71,"column":6}},"49":{"start":{"line":65,"column":20},"end":{"line":65,"column":43}},"50":{"start":{"line":66,"column":8},"end":{"line":69,"column":null}},"51":{"start":{"line":67,"column":12},"end":{"line":67,"column":76}},"52":{"start":{"line":68,"column":12},"end":{"line":68,"column":25}},"53":{"start":{"line":70,"column":8},"end":{"line":70,"column":27}},"54":{"start":{"line":72,"column":4},"end":{"line":72,"column":28}},"55":{"start":{"line":74,"column":0},"end":{"line":74,"column":40}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":56},"end":{"line":2,"column":66}},"loc":{"start":{"line":2,"column":69},"end":{"line":4,"column":1}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":6,"column":35},"end":{"line":6,"column":null}},"loc":{"start":{"line":6,"column":35},"end":{"line":41,"column":1}}},"2":{"name":"ElapsedLogger","decl":{"start":{"line":7,"column":13},"end":{"line":7,"column":26}},"loc":{"start":{"line":7,"column":26},"end":{"line":9,"column":5}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":10,"column":34},"end":{"line":10,"column":44}},"loc":{"start":{"line":10,"column":49},"end":{"line":14,"column":5}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":15,"column":34},"end":{"line":15,"column":null}},"loc":{"start":{"line":15,"column":34},"end":{"line":18,"column":5}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":19,"column":36},"end":{"line":19,"column":46}},"loc":{"start":{"line":19,"column":52},"end":{"line":39,"column":5}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":42,"column":38},"end":{"line":42,"column":null}},"loc":{"start":{"line":42,"column":38},"end":{"line":73,"column":1}}},"7":{"name":"SimpleTimeLogger","decl":{"start":{"line":43,"column":13},"end":{"line":43,"column":29}},"loc":{"start":{"line":43,"column":29},"end":{"line":45,"column":5}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":46,"column":39},"end":{"line":46,"column":49}},"loc":{"start":{"line":46,"column":54},"end":{"line":54,"column":5}}},"9":{"name":"(anonymous_9)","decl":{"start":{"line":55,"column":37},"end":{"line":55,"column":47}},"loc":{"start":{"line":55,"column":67},"end":{"line":63,"column":5}}},"10":{"name":"(anonymous_10)","decl":{"start":{"line":64,"column":37},"end":{"line":64,"column":47}},"loc":{"start":{"line":64,"column":52},"end":{"line":71,"column":5}}}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},"type":"binary-expr","locations":[{"start":{"line":2,"column":23},"end":{"line":2,"column":27}},{"start":{"line":2,"column":31},"end":{"line":2,"column":51}},{"start":{"line":2,"column":56},"end":{"line":4,"column":1}}]},"1":{"loc":{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},"type":"cond-expr","locations":[{"start":{"line":3,"column":37},"end":{"line":3,"column":40}},{"start":{"line":3,"column":43},"end":{"line":3,"column":61}}]},"2":{"loc":{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},"type":"binary-expr","locations":[{"start":{"line":3,"column":12},"end":{"line":3,"column":15}},{"start":{"line":3,"column":19},"end":{"line":3,"column":33}}]},"3":{"loc":{"start":{"line":11,"column":8},"end":{"line":11,"column":null}},"type":"if","locations":[{"start":{"line":11,"column":8},"end":{"line":11,"column":null}},{"start":{"line":11,"column":8},"end":{"line":11,"column":null}}]},"4":{"loc":{"start":{"line":13,"column":34},"end":{"line":13,"column":45}},"type":"cond-expr","locations":[{"start":{"line":13,"column":34},"end":{"line":13,"column":45}},{"start":{"line":13,"column":48},"end":{"line":13,"column":50}}]},"5":{"loc":{"start":{"line":26,"column":8},"end":{"line":28,"column":null}},"type":"if","locations":[{"start":{"line":26,"column":8},"end":{"line":28,"column":null}},{"start":{"line":26,"column":8},"end":{"line":28,"column":null}}]},"6":{"loc":{"start":{"line":29,"column":8},"end":{"line":31,"column":null}},"type":"if","locations":[{"start":{"line":29,"column":8},"end":{"line":31,"column":null}},{"start":{"line":29,"column":8},"end":{"line":31,"column":null}}]},"7":{"loc":{"start":{"line":32,"column":8},"end":{"line":34,"column":null}},"type":"if","locations":[{"start":{"line":32,"column":8},"end":{"line":34,"column":null}},{"start":{"line":32,"column":8},"end":{"line":34,"column":null}}]},"8":{"loc":{"start":{"line":35,"column":8},"end":{"line":37,"column":null}},"type":"if","locations":[{"start":{"line":35,"column":8},"end":{"line":37,"column":null}},{"start":{"line":35,"column":8},"end":{"line":37,"column":null}}]},"9":{"loc":{"start":{"line":35,"column":12},"end":{"line":35,"column":22}},"type":"binary-expr","locations":[{"start":{"line":35,"column":12},"end":{"line":35,"column":22}},{"start":{"line":35,"column":26},"end":{"line":35,"column":35}},{"start":{"line":35,"column":39},"end":{"line":35,"column":46}},{"start":{"line":35,"column":50},"end":{"line":35,"column":56}}]},"10":{"loc":{"start":{"line":47,"column":8},"end":{"line":47,"column":null}},"type":"if","locations":[{"start":{"line":47,"column":8},"end":{"line":47,"column":null}},{"start":{"line":47,"column":8},"end":{"line":47,"column":null}}]},"11":{"loc":{"start":{"line":49,"column":8},"end":{"line":51,"column":null}},"type":"if","locations":[{"start":{"line":49,"column":8},"end":{"line":51,"column":null}},{"start":{"line":49,"column":8},"end":{"line":51,"column":null}}]},"12":{"loc":{"start":{"line":56,"column":8},"end":{"line":56,"column":null}},"type":"if","locations":[{"start":{"line":56,"column":8},"end":{"line":56,"column":null}},{"start":{"line":56,"column":8},"end":{"line":56,"column":null}}]},"13":{"loc":{"start":{"line":58,"column":8},"end":{"line":60,"column":null}},"type":"if","locations":[{"start":{"line":58,"column":8},"end":{"line":60,"column":null}},{"start":{"line":58,"column":8},"end":{"line":60,"column":null}}]},"14":{"loc":{"start":{"line":61,"column":21},"end":{"line":61,"column":34}},"type":"binary-expr","locations":[{"start":{"line":61,"column":21},"end":{"line":61,"column":34}},{"start":{"line":61,"column":38},"end":{"line":61,"column":43}}]},"15":{"loc":{"start":{"line":66,"column":8},"end":{"line":69,"column":null}},"type":"if","locations":[{"start":{"line":66,"column":8},"end":{"line":69,"column":null}},{"start":{"line":66,"column":8},"end":{"line":69,"column":null}}]}},"s":{"0":4,"1":4,"2":4,"3":4,"4":10,"5":4,"6":2,"7":1,"8":2,"9":2,"10":4,"11":7,"12":7,"13":4,"14":9,"15":9,"16":9,"17":9,"18":9,"19":9,"20":9,"21":1,"22":9,"23":2,"24":9,"25":6,"26":9,"27":1,"28":9,"29":4,"30":4,"31":4,"32":4,"33":10,"34":6,"35":10,"36":10,"37":6,"38":4,"39":4,"40":4,"41":3,"42":2,"43":3,"44":3,"45":1,"46":2,"47":2,"48":4,"49":4,"50":4,"51":1,"52":1,"53":3,"54":4,"55":4},"f":{"0":4,"1":4,"2":10,"3":2,"4":7,"5":9,"6":4,"7":4,"8":10,"9":3,"10":4},"b":{"0":[4,4,4],"1":[0,4],"2":[4,4],"3":[1,1],"4":[1,1],"5":[1,8],"6":[2,7],"7":[6,3],"8":[1,8],"9":[9,7,7,3],"10":[6,4],"11":[6,4],"12":[2,1],"13":[1,2],"14":[2,1],"15":[1,3]}}
}
224 changes: 224 additions & 0 deletions coverage/lcov-report/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,224 @@
body, html {
margin:0; padding: 0;
height: 100%;
}
body {
font-family: Helvetica Neue, Helvetica, Arial;
font-size: 14px;
color:#333;
}
.small { font-size: 12px; }
*, *:after, *:before {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
h1 { font-size: 20px; margin: 0;}
h2 { font-size: 14px; }
pre {
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
margin: 0;
padding: 0;
-moz-tab-size: 2;
-o-tab-size: 2;
tab-size: 2;
}
a { color:#0074D9; text-decoration:none; }
a:hover { text-decoration:underline; }
.strong { font-weight: bold; }
.space-top1 { padding: 10px 0 0 0; }
.pad2y { padding: 20px 0; }
.pad1y { padding: 10px 0; }
.pad2x { padding: 0 20px; }
.pad2 { padding: 20px; }
.pad1 { padding: 10px; }
.space-left2 { padding-left:55px; }
.space-right2 { padding-right:20px; }
.center { text-align:center; }
.clearfix { display:block; }
.clearfix:after {
content:'';
display:block;
height:0;
clear:both;
visibility:hidden;
}
.fl { float: left; }
@media only screen and (max-width:640px) {
.col3 { width:100%; max-width:100%; }
.hide-mobile { display:none!important; }
}

.quiet {
color: #7f7f7f;
color: rgba(0,0,0,0.5);
}
.quiet a { opacity: 0.7; }

.fraction {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 10px;
color: #555;
background: #E8E8E8;
padding: 4px 5px;
border-radius: 3px;
vertical-align: middle;
}

div.path a:link, div.path a:visited { color: #333; }
table.coverage {
border-collapse: collapse;
margin: 10px 0 0 0;
padding: 0;
}

table.coverage td {
margin: 0;
padding: 0;
vertical-align: top;
}
table.coverage td.line-count {
text-align: right;
padding: 0 5px 0 20px;
}
table.coverage td.line-coverage {
text-align: right;
padding-right: 10px;
min-width:20px;
}

table.coverage td span.cline-any {
display: inline-block;
padding: 0 5px;
width: 100%;
}
.missing-if-branch {
display: inline-block;
margin-right: 5px;
border-radius: 3px;
position: relative;
padding: 0 4px;
background: #333;
color: yellow;
}

.skip-if-branch {
display: none;
margin-right: 10px;
position: relative;
padding: 0 4px;
background: #ccc;
color: white;
}
.missing-if-branch .typ, .skip-if-branch .typ {
color: inherit !important;
}
.coverage-summary {
border-collapse: collapse;
width: 100%;
}
.coverage-summary tr { border-bottom: 1px solid #bbb; }
.keyline-all { border: 1px solid #ddd; }
.coverage-summary td, .coverage-summary th { padding: 10px; }
.coverage-summary tbody { border: 1px solid #bbb; }
.coverage-summary td { border-right: 1px solid #bbb; }
.coverage-summary td:last-child { border-right: none; }
.coverage-summary th {
text-align: left;
font-weight: normal;
white-space: nowrap;
}
.coverage-summary th.file { border-right: none !important; }
.coverage-summary th.pct { }
.coverage-summary th.pic,
.coverage-summary th.abs,
.coverage-summary td.pct,
.coverage-summary td.abs { text-align: right; }
.coverage-summary td.file { white-space: nowrap; }
.coverage-summary td.pic { min-width: 120px !important; }
.coverage-summary tfoot td { }

.coverage-summary .sorter {
height: 10px;
width: 7px;
display: inline-block;
margin-left: 0.5em;
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
}
.coverage-summary .sorted .sorter {
background-position: 0 -20px;
}
.coverage-summary .sorted-desc .sorter {
background-position: 0 -10px;
}
.status-line { height: 10px; }
/* yellow */
.cbranch-no { background: yellow !important; color: #111; }
/* dark red */
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
.low .chart { border:1px solid #C21F39 }
.highlighted,
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
background: #C21F39 !important;
}
/* medium red */
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
/* light red */
.low, .cline-no { background:#FCE1E5 }
/* light green */
.high, .cline-yes { background:rgb(230,245,208) }
/* medium green */
.cstat-yes { background:rgb(161,215,106) }
/* dark green */
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
.high .chart { border:1px solid rgb(77,146,33) }
/* dark yellow (gold) */
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
.medium .chart { border:1px solid #f9cd0b; }
/* light yellow */
.medium { background: #fff4c2; }

.cstat-skip { background: #ddd; color: #111; }
.fstat-skip { background: #ddd; color: #111 !important; }
.cbranch-skip { background: #ddd !important; color: #111; }

span.cline-neutral { background: #eaeaea; }

.coverage-summary td.empty {
opacity: .5;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1;
color: #888;
}

.cover-fill, .cover-empty {
display:inline-block;
height: 12px;
}
.chart {
line-height: 0;
}
.cover-empty {
background: white;
}
.cover-full {
border-right: none !important;
}
pre.prettyprint {
border: none !important;
padding: 0 !important;
margin: 0 !important;
}
.com { color: #999 !important; }
.ignore-none { color: #999; font-weight: normal; }

.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -48px;
}
.footer, .push {
height: 48px;
}
Loading

0 comments on commit 67016a1

Please sign in to comment.