Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
}
}
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
};
64 changes: 64 additions & 0 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1690694561870" clover="3.2.0">
<project timestamp="1690694561870" name="All files">
<metrics statements="34" coveredstatements="31" conditionals="10" coveredconditionals="6" methods="13" coveredmethods="10" elements="57" coveredelements="47" complexity="0" loc="34" ncloc="34" packages="2" files="6" classes="6"/>
<package name="TestDocs">
<metrics statements="6" coveredstatements="6" conditionals="2" coveredconditionals="1" methods="2" coveredmethods="2"/>
<file name="checkData.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\TestDocs\checkData.js">
<metrics statements="6" coveredstatements="6" conditionals="2" coveredconditionals="1" methods="2" coveredmethods="2"/>
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="7" count="1" type="stmt"/>
<line num="10" count="1" type="stmt"/>
</file>
</package>
<package name="modules">
<metrics statements="28" coveredstatements="25" conditionals="8" coveredconditionals="5" methods="11" coveredmethods="8"/>
<file name="DeleteCompleted.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\modules\DeleteCompleted.js">
<metrics statements="5" coveredstatements="4" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="2"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="7" count="0" type="stmt"/>
<line num="9" count="1" type="stmt"/>
</file>
<file name="DeleteTask.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\modules\DeleteTask.js">
<metrics statements="6" coveredstatements="5" conditionals="0" coveredconditionals="0" methods="3" coveredmethods="1"/>
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="7" count="0" type="stmt"/>
<line num="9" count="1" type="stmt"/>
</file>
<file name="DisplayTask.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\modules\DisplayTask.js">
<metrics statements="5" coveredstatements="5" conditionals="2" coveredconditionals="1" methods="1" coveredmethods="1"/>
<line num="5" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="8" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="9" count="1" type="stmt"/>
<line num="11" count="1" type="stmt"/>
</file>
<file name="FetchFromLs.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\modules\FetchFromLs.js">
<metrics statements="3" coveredstatements="3" conditionals="2" coveredconditionals="2" methods="1" coveredmethods="1"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="10" type="cond" truecount="2" falsecount="0"/>
<line num="3" count="10" type="stmt"/>
</file>
<file name="editTask.js" path="F:\Microverse\Pair Programming\Webpack-Project\src\modules\editTask.js">
<metrics statements="9" coveredstatements="8" conditionals="4" coveredconditionals="2" methods="3" coveredmethods="3"/>
<line num="3" count="1" type="stmt"/>
<line num="6" count="1" type="stmt"/>
<line num="10" count="1" type="stmt"/>
<line num="11" count="1" type="stmt"/>
<line num="13" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="14" count="1" type="stmt"/>
<line num="15" count="1" type="cond" truecount="1" falsecount="1"/>
<line num="16" count="0" type="stmt"/>
<line num="19" count="1" type="stmt"/>
</file>
</package>
</project>
</coverage>
7 changes: 7 additions & 0 deletions coverage/coverage-final.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\TestDocs\\checkData.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\TestDocs\\checkData.js","statementMap":{"0":{"start":{"line":3,"column":21},"end":{"line":11,"column":1}},"1":{"start":{"line":4,"column":15},"end":{"line":4,"column":27}},"2":{"start":{"line":5,"column":2},"end":{"line":9,"column":5}},"3":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":6},"end":{"line":7,"column":33}},"5":{"start":{"line":10,"column":2},"end":{"line":10,"column":54}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":21},"end":{"line":3,"column":22}},"loc":{"start":{"line":3,"column":49},"end":{"line":11,"column":1}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":5,"column":15},"end":{"line":5,"column":16}},"loc":{"start":{"line":5,"column":25},"end":{"line":9,"column":3}},"line":5}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},"type":"if","locations":[{"start":{"line":6,"column":4},"end":{"line":8,"column":5}},{"start":{},"end":{}}],"line":6}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1},"f":{"0":1,"1":1},"b":{"0":[1,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a0d11cf3ade9bf98deab198d752da059068248a0"}
,"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DeleteCompleted.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DeleteCompleted.js","statementMap":{"0":{"start":{"line":4,"column":15},"end":{"line":4,"column":27}},"1":{"start":{"line":5,"column":20},"end":{"line":5,"column":65}},"2":{"start":{"line":5,"column":41},"end":{"line":5,"column":64}},"3":{"start":{"line":6,"column":2},"end":{"line":8,"column":5}},"4":{"start":{"line":7,"column":4},"end":{"line":7,"column":27}},"5":{"start":{"line":9,"column":2},"end":{"line":9,"column":59}}},"fnMap":{"0":{"name":"clearChecked","decl":{"start":{"line":3,"column":9},"end":{"line":3,"column":21}},"loc":{"start":{"line":3,"column":24},"end":{"line":10,"column":1}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":5,"column":32},"end":{"line":5,"column":33}},"loc":{"start":{"line":5,"column":41},"end":{"line":5,"column":64}},"line":5},"2":{"name":"(anonymous_2)","decl":{"start":{"line":6,"column":20},"end":{"line":6,"column":21}},"loc":{"start":{"line":6,"column":37},"end":{"line":8,"column":3}},"line":6}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":1,"4":0,"5":1},"f":{"0":1,"1":1,"2":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d4869ccfeb99ce102a32ee39068a275539a8e986"}
,"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DeleteTask.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DeleteTask.js","statementMap":{"0":{"start":{"line":3,"column":19},"end":{"line":10,"column":1}},"1":{"start":{"line":4,"column":15},"end":{"line":4,"column":27}},"2":{"start":{"line":5,"column":21},"end":{"line":5,"column":64}},"3":{"start":{"line":5,"column":42},"end":{"line":5,"column":63}},"4":{"start":{"line":6,"column":2},"end":{"line":8,"column":5}},"5":{"start":{"line":7,"column":4},"end":{"line":7,"column":27}},"6":{"start":{"line":9,"column":2},"end":{"line":9,"column":60}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":19},"end":{"line":3,"column":20}},"loc":{"start":{"line":3,"column":26},"end":{"line":10,"column":1}},"line":3},"1":{"name":"(anonymous_1)","decl":{"start":{"line":5,"column":33},"end":{"line":5,"column":34}},"loc":{"start":{"line":5,"column":42},"end":{"line":5,"column":63}},"line":5},"2":{"name":"(anonymous_2)","decl":{"start":{"line":6,"column":21},"end":{"line":6,"column":22}},"loc":{"start":{"line":6,"column":38},"end":{"line":8,"column":3}},"line":6}},"branchMap":{},"s":{"0":1,"1":1,"2":1,"3":0,"4":1,"5":0,"6":1},"f":{"0":1,"1":0,"2":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"3084ae8764ac43efa96cd5f3127c5d028d64f9c0"}
,"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DisplayTask.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\DisplayTask.js","statementMap":{"0":{"start":{"line":5,"column":17},"end":{"line":13,"column":1}},"1":{"start":{"line":6,"column":15},"end":{"line":6,"column":27}},"2":{"start":{"line":8,"column":2},"end":{"line":12,"column":3}},"3":{"start":{"line":9,"column":20},"end":{"line":9,"column":58}},"4":{"start":{"line":11,"column":4},"end":{"line":11,"column":22}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":17},"end":{"line":5,"column":18}},"loc":{"start":{"line":5,"column":26},"end":{"line":13,"column":1}},"line":5}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":2},"end":{"line":12,"column":3}},"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":12,"column":3}},{"start":{},"end":{}}],"line":8}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1},"f":{"0":1},"b":{"0":[1,0]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"5f1dfcc7ac518564f6467ee7ba0cd320d839582b"}
,"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\FetchFromLs.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\FetchFromLs.js","statementMap":{"0":{"start":{"line":1,"column":19},"end":{"line":4,"column":1}},"1":{"start":{"line":2,"column":17},"end":{"line":2,"column":64}},"2":{"start":{"line":3,"column":2},"end":{"line":3,"column":16}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":1,"column":19},"end":{"line":1,"column":20}},"loc":{"start":{"line":1,"column":25},"end":{"line":4,"column":1}},"line":1}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":17},"end":{"line":2,"column":64}},"type":"binary-expr","locations":[{"start":{"line":2,"column":17},"end":{"line":2,"column":58}},{"start":{"line":2,"column":62},"end":{"line":2,"column":64}}],"line":2}},"s":{"0":1,"1":10,"2":10},"f":{"0":10},"b":{"0":[10,2]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"c2c0f4dbab070db6cf3209bca3c864199777c998"}
,"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\editTask.js": {"path":"F:\\Microverse\\Pair Programming\\Webpack-Project\\src\\modules\\editTask.js","statementMap":{"0":{"start":{"line":3,"column":18},"end":{"line":3,"column":22}},"1":{"start":{"line":6,"column":2},"end":{"line":6,"column":24}},"2":{"start":{"line":10,"column":15},"end":{"line":10,"column":27}},"3":{"start":{"line":11,"column":14},"end":{"line":11,"column":21}},"4":{"start":{"line":13,"column":2},"end":{"line":20,"column":3}},"5":{"start":{"line":14,"column":4},"end":{"line":18,"column":7}},"6":{"start":{"line":15,"column":6},"end":{"line":17,"column":7}},"7":{"start":{"line":16,"column":8},"end":{"line":16,"column":31}},"8":{"start":{"line":19,"column":4},"end":{"line":19,"column":56}}},"fnMap":{"0":{"name":"currVal","decl":{"start":{"line":5,"column":9},"end":{"line":5,"column":16}},"loc":{"start":{"line":5,"column":20},"end":{"line":7,"column":1}},"line":5},"1":{"name":"editTask","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":17}},"loc":{"start":{"line":9,"column":21},"end":{"line":21,"column":1}},"line":9},"2":{"name":"(anonymous_2)","decl":{"start":{"line":14,"column":17},"end":{"line":14,"column":18}},"loc":{"start":{"line":14,"column":27},"end":{"line":18,"column":5}},"line":14}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":2},"end":{"line":20,"column":3}},"type":"if","locations":[{"start":{"line":13,"column":2},"end":{"line":20,"column":3}},{"start":{},"end":{}}],"line":13},"1":{"loc":{"start":{"line":15,"column":6},"end":{"line":17,"column":7}},"type":"if","locations":[{"start":{"line":15,"column":6},"end":{"line":17,"column":7}},{"start":{},"end":{}}],"line":15}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":0,"8":1},"f":{"0":1,"1":1,"2":1},"b":{"0":[1,0],"1":[0,1]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"e3b9796d207948f44fe328149b66f15a7d356be5"}
}
124 changes: 124 additions & 0 deletions coverage/lcov-report/TestDocs/checkData.js.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

<!doctype html>
<html lang="en">

<head>
<title>Code coverage report for TestDocs/checkData.js</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../prettify.css" />
<link rel="stylesheet" href="../base.css" />
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
<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">TestDocs</a> checkData.js</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/6</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">50% </span>
<span class="quiet">Branches</span>
<span class='fraction'>1/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>6/6</span>
</div>


</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
<template id="filterTemplate">
<div class="quiet">
Filter:
<input oninput="onInput()" type="search" id="fileSearch">
</div>
</template>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a></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-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</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-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</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></td><td class="text"><pre class="prettyprint lang-js">import fetchTodos from '../modules/FetchFromLs.js';
&nbsp;
const checkboxTest = (description, itsStatus) =&gt; {
const item = fetchTodos();
item.forEach((task) =&gt; {
<span class="missing-if-branch" title="else path not taken" >E</span>if (task.description === description) {
task.completed = itsStatus;
}
});
localStorage.setItem('tasks', JSON.stringify(item));
};
&nbsp;
export default checkboxTest;
&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" rel="noopener noreferrer">istanbul</a>
at 2023-07-30T05:22:41.420Z
</div>
<script src="../prettify.js"></script>
<script>
window.onload = function () {
prettyPrint();
};
</script>
<script src="../sorter.js"></script>
<script src="../block-navigation.js"></script>
</body>
</html>

Loading