Skip to content

Commit

Permalink
fix: fixing bug Unit update test
Browse files Browse the repository at this point in the history
  • Loading branch information
fagnersantiago committed May 11, 2023
1 parent 68fd9ae commit c3fe087
Show file tree
Hide file tree
Showing 28 changed files with 271 additions and 262 deletions.
85 changes: 44 additions & 41 deletions coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1682746897161" clover="3.2.0">
<project timestamp="1682746897162" name="All files">
<metrics statements="333" coveredstatements="314" conditionals="36" coveredconditionals="35" methods="25" coveredmethods="23" elements="394" coveredelements="372" complexity="0" loc="333" ncloc="333" packages="11" files="11" classes="11"/>
<coverage generated="1683813407524" clover="3.2.0">
<project timestamp="1683813407524" name="All files">
<metrics statements="336" coveredstatements="336" conditionals="38" coveredconditionals="38" methods="25" coveredmethods="24" elements="399" coveredelements="398" complexity="0" loc="336" ncloc="336" packages="11" files="11" classes="11"/>
<package name="modules.country.infra.typeorm.entities">
<metrics statements="22" coveredstatements="22" conditionals="1" coveredconditionals="1" methods="1" coveredmethods="1"/>
<file name="Country.ts" path="C:\Users\fagne\Documents\backend-challenge\src\modules\country\infra\typeorm\entities\Country.ts">
Expand Down Expand Up @@ -150,9 +150,9 @@
</file>
</package>
<package name="modules.places.repository.inMemory">
<metrics statements="62" coveredstatements="52" conditionals="11" coveredconditionals="11" methods="7" coveredmethods="6"/>
<metrics statements="62" coveredstatements="62" conditionals="13" coveredconditionals="13" methods="7" coveredmethods="7"/>
<file name="CreatePlaceRepositoryInMemory.ts" path="C:\Users\fagne\Documents\backend-challenge\src\modules\places\repository\inMemory\CreatePlaceRepositoryInMemory.ts">
<metrics statements="62" coveredstatements="52" conditionals="11" coveredconditionals="11" methods="7" coveredmethods="6"/>
<metrics statements="62" coveredstatements="62" conditionals="13" coveredconditionals="13" methods="7" coveredmethods="7"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
Expand Down Expand Up @@ -194,17 +194,17 @@
<line num="39" count="1" type="stmt"/>
<line num="40" count="1" type="stmt"/>
<line num="41" count="7" type="stmt"/>
<line num="42" count="7" type="stmt"/>
<line num="43" count="0" type="stmt"/>
<line num="44" count="0" type="stmt"/>
<line num="45" count="0" type="stmt"/>
<line num="46" count="0" type="stmt"/>
<line num="47" count="0" type="stmt"/>
<line num="48" count="0" type="stmt"/>
<line num="49" count="0" type="stmt"/>
<line num="50" count="0" type="stmt"/>
<line num="51" count="0" type="stmt"/>
<line num="52" count="0" type="stmt"/>
<line num="42" count="7" type="cond" truecount="1" falsecount="0"/>
<line num="43" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="44" count="1" type="stmt"/>
<line num="45" count="1" type="stmt"/>
<line num="46" count="1" type="stmt"/>
<line num="47" count="1" type="stmt"/>
<line num="48" count="1" type="stmt"/>
<line num="49" count="1" type="stmt"/>
<line num="50" count="1" type="stmt"/>
<line num="51" count="1" type="stmt"/>
<line num="52" count="1" type="stmt"/>
<line num="53" count="7" type="stmt"/>
<line num="54" count="7" type="cond" truecount="1" falsecount="0"/>
<line num="55" count="1" type="cond" truecount="1" falsecount="0"/>
Expand Down Expand Up @@ -328,9 +328,9 @@
</file>
</package>
<package name="modules.places.useCases.updatePlace">
<metrics statements="37" coveredstatements="28" conditionals="3" coveredconditionals="2" methods="2" coveredmethods="2"/>
<metrics statements="40" coveredstatements="40" conditionals="3" coveredconditionals="3" methods="2" coveredmethods="2"/>
<file name="UpdatePlaceUseCase.ts" path="C:\Users\fagne\Documents\backend-challenge\src\modules\places\useCases\updatePlace\UpdatePlaceUseCase.ts">
<metrics statements="37" coveredstatements="28" conditionals="3" coveredconditionals="2" methods="2" coveredmethods="2"/>
<metrics statements="40" coveredstatements="40" conditionals="3" coveredconditionals="3" methods="2" coveredmethods="2"/>
<line num="1" count="1" type="stmt"/>
<line num="2" count="1" type="stmt"/>
<line num="3" count="1" type="stmt"/>
Expand All @@ -350,24 +350,27 @@
<line num="17" count="2" type="stmt"/>
<line num="18" count="2" type="stmt"/>
<line num="19" count="2" type="stmt"/>
<line num="20" count="2" type="stmt"/>
<line num="21" count="2" type="stmt"/>
<line num="22" count="2" type="stmt"/>
<line num="23" count="0" type="cond" truecount="0" falsecount="1"/>
<line num="24" count="0" type="stmt"/>
<line num="25" count="0" type="stmt"/>
<line num="26" count="0" type="stmt"/>
<line num="27" count="0" type="stmt"/>
<line num="28" count="0" type="stmt"/>
<line num="29" count="0" type="stmt"/>
<line num="30" count="0" type="stmt"/>
<line num="31" count="0" type="stmt"/>
<line num="32" count="2" type="stmt"/>
<line num="33" count="2" type="stmt"/>
<line num="34" count="2" type="stmt"/>
<line num="35" count="2" type="stmt"/>
<line num="20" count="2" type="cond" truecount="1" falsecount="0"/>
<line num="21" count="1" type="stmt"/>
<line num="22" count="1" type="stmt"/>
<line num="23" count="1" type="stmt"/>
<line num="24" count="1" type="stmt"/>
<line num="25" count="1" type="stmt"/>
<line num="26" count="1" type="stmt"/>
<line num="27" count="1" type="stmt"/>
<line num="28" count="1" type="stmt"/>
<line num="29" count="1" type="stmt"/>
<line num="30" count="1" type="stmt"/>
<line num="31" count="1" type="stmt"/>
<line num="32" count="1" type="stmt"/>
<line num="33" count="1" type="stmt"/>
<line num="34" count="1" type="stmt"/>
<line num="35" count="1" type="stmt"/>
<line num="36" count="1" type="stmt"/>
<line num="37" count="1" type="stmt"/>
<line num="38" count="2" type="stmt"/>
<line num="39" count="1" type="stmt"/>
<line num="40" count="1" type="stmt"/>
</file>
</package>
<package name="shared.Error">
Expand All @@ -379,9 +382,9 @@
<line num="3" count="1" type="stmt"/>
<line num="4" count="1" type="stmt"/>
<line num="5" count="1" type="cond" truecount="1" falsecount="0"/>
<line num="6" count="9" type="stmt"/>
<line num="7" count="9" type="stmt"/>
<line num="8" count="9" type="stmt"/>
<line num="6" count="7" type="stmt"/>
<line num="7" count="7" type="stmt"/>
<line num="8" count="7" type="stmt"/>
<line num="9" count="1" type="stmt"/>
</file>
</package>
Expand All @@ -395,10 +398,10 @@
<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="2" type="cond" truecount="1" falsecount="0"/>
<line num="8" count="2" type="stmt"/>
<line num="9" count="2" type="stmt"/>
<line num="10" count="2" type="stmt"/>
<line num="7" count="3" type="cond" truecount="1" falsecount="0"/>
<line num="8" count="3" type="stmt"/>
<line num="9" count="3" type="stmt"/>
<line num="10" count="3" type="stmt"/>
</file>
</package>
</project>
Expand Down
8 changes: 4 additions & 4 deletions coverage/coverage-final.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ <h1>All files</h1>
<div class='clearfix'>

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


<div class='fl pad1y space-right2'>
<span class="strong">97.22% </span>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>35/36</span>
<span class='fraction'>38/38</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">92% </span>
<span class="strong">96% </span>
<span class="quiet">Functions</span>
<span class='fraction'>23/25</span>
<span class='fraction'>24/25</span>
</div>


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


Expand Down Expand Up @@ -140,17 +140,17 @@ <h1>All files</h1>

<tr>
<td class="file high" data-value="modules/places/repository/inMemory"><a href="modules/places/repository/inMemory/index.html">modules/places/repository/inMemory</a></td>
<td data-value="83.87" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 83%"></div><div class="cover-empty" style="width: 17%"></div></div>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="83.87" class="pct high">83.87%</td>
<td data-value="62" class="abs high">52/62</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="11" class="abs high">11/11</td>
<td data-value="85.71" class="pct high">85.71%</td>
<td data-value="7" class="abs high">6/7</td>
<td data-value="83.87" class="pct high">83.87%</td>
<td data-value="62" class="abs high">52/62</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="62" class="abs high">62/62</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="13" class="abs high">13/13</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="7" class="abs high">7/7</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="62" class="abs high">62/62</td>
</tr>

<tr>
Expand Down Expand Up @@ -199,18 +199,18 @@ <h1>All files</h1>
</tr>

<tr>
<td class="file medium" data-value="modules/places/useCases/updatePlace"><a href="modules/places/useCases/updatePlace/index.html">modules/places/useCases/updatePlace</a></td>
<td data-value="75.67" class="pic medium">
<div class="chart"><div class="cover-fill" style="width: 75%"></div><div class="cover-empty" style="width: 25%"></div></div>
<td class="file high" data-value="modules/places/useCases/updatePlace"><a href="modules/places/useCases/updatePlace/index.html">modules/places/useCases/updatePlace</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="75.67" class="pct medium">75.67%</td>
<td data-value="37" class="abs medium">28/37</td>
<td data-value="66.66" class="pct medium">66.66%</td>
<td data-value="3" class="abs medium">2/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="40" class="abs high">40/40</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="3" class="abs high">3/3</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="75.67" class="pct medium">75.67%</td>
<td data-value="37" class="abs medium">28/37</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="40" class="abs high">40/40</td>
</tr>

<tr>
Expand Down Expand Up @@ -251,7 +251,7 @@ <h1>All files</h1>
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mod
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../../../index.html">All files</a> modules/country/infra/type
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">module
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../../index.html">All files</a> modules/country/repository/in
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">modules/c
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/modules/country/useCase/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> modules/country/useCase</h1>
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ <h1><a href="../../../../../index.html">All files</a> / <a href="index.html">mod
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../../../index.html">All files</a> modules/places/infra/typeo
<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-04-29T05:41:37.001Z
at 2023-05-11T13:56:47.429Z
</div>
<script src="../../../../../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit c3fe087

Please sign in to comment.