Skip to content

Commit

Permalink
live patch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
floodfx committed Feb 10, 2022
1 parent c23bc41 commit 47a3a3a
Show file tree
Hide file tree
Showing 41 changed files with 318 additions and 495 deletions.
86 changes: 43 additions & 43 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="1644464683735" clover="3.2.0">
<project timestamp="1644464683735" name="All files">
<metrics statements="386" coveredstatements="293" conditionals="184" coveredconditionals="126" methods="86" coveredmethods="69" elements="656" coveredelements="488" complexity="0" loc="386" ncloc="386" packages="8" files="20" classes="20"/>
<coverage generated="1644465547259" clover="3.2.0">
<project timestamp="1644465547259" name="All files">
<metrics statements="386" coveredstatements="299" conditionals="184" coveredconditionals="130" methods="86" coveredmethods="71" elements="656" coveredelements="500" complexity="0" loc="386" ncloc="386" packages="8" files="20" classes="20"/>
<package name="examples.autocomplete">
<metrics statements="5" coveredstatements="5" conditionals="1" coveredconditionals="1" methods="2" coveredmethods="2"/>
<file name="data.ts" path="/Users/donnie/src/github.com/floodfx/liveviewjs/src/examples/autocomplete/data.ts">
Expand Down Expand Up @@ -41,18 +41,18 @@
<line num="27" count="1" type="stmt"/>
<line num="28" count="5" type="stmt"/>
<line num="31" count="1" type="stmt"/>
<line num="53" count="1" type="stmt"/>
<line num="54" count="4" type="stmt"/>
<line num="55" count="4" type="cond" truecount="1" falsecount="0"/>
<line num="56" count="3" type="stmt"/>
<line num="57" count="3" type="stmt"/>
<line num="59" count="4" type="stmt"/>
<line num="62" count="1" type="stmt"/>
<line num="63" count="2" type="stmt"/>
<line num="64" count="2" type="cond" truecount="1" falsecount="0"/>
<line num="65" count="1" type="stmt"/>
<line num="66" count="1" type="stmt"/>
<line num="68" count="2" type="stmt"/>
<line num="33" count="1" type="stmt"/>
<line num="34" count="4" type="stmt"/>
<line num="35" count="4" type="cond" truecount="1" falsecount="0"/>
<line num="36" count="3" type="stmt"/>
<line num="37" count="3" type="stmt"/>
<line num="39" count="4" type="stmt"/>
<line num="42" count="1" type="stmt"/>
<line num="43" count="2" type="stmt"/>
<line num="44" count="2" type="cond" truecount="1" falsecount="0"/>
<line num="45" count="1" type="stmt"/>
<line num="46" count="1" type="stmt"/>
<line num="48" count="2" type="stmt"/>
</file>
</package>
<package name="server">
Expand Down Expand Up @@ -350,23 +350,23 @@
<metrics statements="37" coveredstatements="37" conditionals="13" coveredconditionals="13" methods="12" coveredmethods="11"/>
<file name="index.ts" path="/Users/donnie/src/github.com/floodfx/liveviewjs/src/server/templates/index.ts">
<metrics statements="37" coveredstatements="37" conditionals="13" coveredconditionals="13" methods="12" coveredmethods="11"/>
<line num="8" count="6" type="stmt"/>
<line num="19" count="6" type="stmt"/>
<line num="21" count="6" type="stmt"/>
<line num="23" count="6" type="cond" truecount="1" falsecount="0"/>
<line num="8" count="7" type="stmt"/>
<line num="19" count="7" type="stmt"/>
<line num="21" count="7" type="stmt"/>
<line num="23" count="7" type="cond" truecount="1" falsecount="0"/>
<line num="24" count="6" type="cond" truecount="1" falsecount="0"/>
<line num="25" count="1" type="stmt"/>
<line num="28" count="5" type="stmt"/>
<line num="31" count="6" type="stmt"/>
<line num="32" count="13" type="stmt"/>
<line num="36" count="114" type="cond" truecount="1" falsecount="0"/>
<line num="37" count="26" type="stmt"/>
<line num="39" count="88" type="cond" truecount="1" falsecount="0"/>
<line num="31" count="7" type="stmt"/>
<line num="32" count="17" type="stmt"/>
<line num="36" count="123" type="cond" truecount="1" falsecount="0"/>
<line num="37" count="30" type="stmt"/>
<line num="39" count="93" type="cond" truecount="1" falsecount="0"/>
<line num="40" count="1" type="stmt"/>
<line num="42" count="87" type="stmt"/>
<line num="45" count="6" type="stmt"/>
<line num="51" count="76" type="stmt"/>
<line num="52" count="76" type="stmt"/>
<line num="42" count="92" type="stmt"/>
<line num="45" count="7" type="stmt"/>
<line num="51" count="83" type="stmt"/>
<line num="52" count="83" type="stmt"/>
<line num="57" count="26" type="cond" truecount="1" falsecount="0"/>
<line num="58" count="11" type="stmt"/>
<line num="63" count="15" type="stmt"/>
Expand All @@ -382,15 +382,15 @@
<line num="96" count="15" type="cond" truecount="1" falsecount="0"/>
<line num="97" count="7" type="stmt"/>
<line num="99" count="15" type="stmt"/>
<line num="103" count="52" type="stmt"/>
<line num="104" count="114" type="stmt"/>
<line num="105" count="114" type="stmt"/>
<line num="111" count="6" type="stmt"/>
<line num="112" count="56" type="stmt"/>
<line num="103" count="59" type="stmt"/>
<line num="104" count="123" type="stmt"/>
<line num="105" count="123" type="stmt"/>
<line num="111" count="7" type="stmt"/>
<line num="112" count="59" type="stmt"/>
</file>
</package>
<package name="server.templates.helpers">
<metrics statements="59" coveredstatements="50" conditionals="88" coveredconditionals="76" methods="16" coveredmethods="13"/>
<metrics statements="59" coveredstatements="56" conditionals="88" coveredconditionals="80" methods="16" coveredmethods="15"/>
<file name="form_for.ts" path="/Users/donnie/src/github.com/floodfx/liveviewjs/src/server/templates/helpers/form_for.ts">
<metrics statements="5" coveredstatements="5" conditionals="20" coveredconditionals="19" methods="1" coveredmethods="1"/>
<line num="10" count="4" type="stmt"/>
Expand Down Expand Up @@ -429,15 +429,15 @@
<line num="37" count="1" type="stmt"/>
</file>
<file name="live_patch.ts" path="/Users/donnie/src/github.com/floodfx/liveviewjs/src/server/templates/helpers/live_patch.ts">
<metrics statements="8" coveredstatements="2" conditionals="4" coveredconditionals="0" methods="2" coveredmethods="0"/>
<line num="1" count="3" type="stmt"/>
<line num="12" count="0" type="stmt"/>
<line num="13" count="0" type="stmt"/>
<line num="14" count="0" type="cond" truecount="0" falsecount="2"/>
<line num="15" count="0" type="stmt"/>
<line num="18" count="0" type="stmt"/>
<line num="22" count="3" type="stmt"/>
<line num="23" count="0" type="stmt"/>
<metrics statements="8" coveredstatements="8" conditionals="4" coveredconditionals="4" methods="2" coveredmethods="2"/>
<line num="1" count="4" type="stmt"/>
<line num="12" count="3" type="stmt"/>
<line num="13" count="3" type="stmt"/>
<line num="14" count="3" type="cond" truecount="2" falsecount="0"/>
<line num="15" count="2" type="stmt"/>
<line num="18" count="1" type="stmt"/>
<line num="22" count="4" type="stmt"/>
<line num="23" count="3" type="cond" truecount="2" falsecount="0"/>
</file>
<file name="live_title_tag.ts" path="/Users/donnie/src/github.com/floodfx/liveviewjs/src/server/templates/helpers/live_title_tag.ts">
<metrics statements="3" coveredstatements="1" conditionals="4" coveredconditionals="0" methods="1" coveredmethods="0"/>
Expand Down
6 changes: 3 additions & 3 deletions coverage/coverage-final.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coverage/lcov-report/examples/autocomplete/data.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3106,7 +3106,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/aut
<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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/examples/autocomplete/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> examples/autocomplete</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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/examples/live-search/data.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/liv
<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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/examples/live-search/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> examples/live-search</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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
64 changes: 2 additions & 62 deletions coverage/lcov-report/examples/volunteers/data.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/vol
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a>
<a name='L53'></a><a href='#L53'>53</a>
<a name='L54'></a><a href='#L54'>54</a>
<a name='L55'></a><a href='#L55'>55</a>
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a>
<a name='L65'></a><a href='#L65'>65</a>
<a name='L66'></a><a href='#L66'>66</a>
<a name='L67'></a><a href='#L67'>67</a>
<a name='L68'></a><a href='#L68'>68</a>
<a name='L69'></a><a href='#L69'>69</a>
<a name='L70'></a><a href='#L70'>70</a>
<a name='L71'></a><a href='#L71'>71</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L51'></a><a href='#L51'>51</a></td><td class="line-coverage quiet"><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-yes">1x</span>
Expand Down Expand Up @@ -165,26 +145,6 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/vol
<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>
<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-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">1x</span>
<span class="cline-any cline-yes">4x</span>
<span class="cline-any cline-yes">4x</span>
Expand Down Expand Up @@ -235,26 +195,6 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/vol
&nbsp;
export const changeset = newChangesetFactory&lt;Volunteer&gt;(VolunteerSchema)
&nbsp;
// export const changeset = (volunteer: Partial&lt;Volunteer&gt;, attrs: Partial&lt;Volunteer&gt;, action?: string): LiveViewChangeset&lt;Volunteer&gt; =&gt; {
// const merged = { ...volunteer, ...attrs };
// const result = VolunteerSchema.safeParse(merged);
// let errors;
// if (result.success === false) {
// errors = result.error.issues.reduce((acc, issue) =&gt; {
// // @ts-ignore
// acc[issue.path[0]] = issue.message;
// return acc;
// }, {} as LiveViewChangesetErrors&lt;Volunteer&gt;)
// }
// return {
// action,
// changes: updatedDiff(volunteer, merged),
// data: result.success ? result.data : merged,
// valid: result.success,
// errors
// } as LiveViewChangeset&lt;Volunteer&gt;
// }
&nbsp;
export const createVolunteer = (newVolunteer: Partial&lt;Volunteer&gt;): LiveViewChangeset&lt;Volunteer&gt; =&gt; {
const result = changeset({}, newVolunteer, 'create');
if (result.valid) {
Expand All @@ -280,7 +220,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">examples/vol
<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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/examples/volunteers/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> examples/volunteers</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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
38 changes: 19 additions & 19 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">76.9% </span>
<span class="strong">78.37% </span>
<span class="quiet">Statements</span>
<span class='fraction'>313/407</span>
<span class='fraction'>319/407</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">68.47% </span>
<span class="strong">70.65% </span>
<span class="quiet">Branches</span>
<span class='fraction'>126/184</span>
<span class='fraction'>130/184</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">80.23% </span>
<span class="strong">82.55% </span>
<span class="quiet">Functions</span>
<span class='fraction'>69/86</span>
<span class='fraction'>71/86</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">75.9% </span>
<span class="strong">77.46% </span>
<span class="quiet">Lines</span>
<span class='fraction'>293/386</span>
<span class='fraction'>299/386</span>
</div>


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

<tr>
<td class="file high" data-value="server/templates/helpers"><a href="server/templates/helpers/index.html">server/templates/helpers</a></td>
<td data-value="86.56" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 86%"></div><div class="cover-empty" style="width: 14%"></div></div>
<td data-value="95.52" class="pic high">
<div class="chart"><div class="cover-fill" style="width: 95%"></div><div class="cover-empty" style="width: 5%"></div></div>
</td>
<td data-value="86.56" class="pct high">86.56%</td>
<td data-value="67" class="abs high">58/67</td>
<td data-value="86.36" class="pct high">86.36%</td>
<td data-value="88" class="abs high">76/88</td>
<td data-value="81.25" class="pct high">81.25%</td>
<td data-value="16" class="abs high">13/16</td>
<td data-value="84.74" class="pct high">84.74%</td>
<td data-value="59" class="abs high">50/59</td>
<td data-value="95.52" class="pct high">95.52%</td>
<td data-value="67" class="abs high">64/67</td>
<td data-value="90.9" class="pct high">90.9%</td>
<td data-value="88" class="abs high">80/88</td>
<td data-value="93.75" class="pct high">93.75%</td>
<td data-value="16" class="abs high">15/16</td>
<td data-value="94.91" class="pct high">94.91%</td>
<td data-value="59" class="abs high">56/59</td>
</tr>

</tbody>
Expand All @@ -206,7 +206,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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">server/compo
<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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/server/component/changeset.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">server/compo
<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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/server/component/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1><a href="../../index.html">All files</a> server/component</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 Wed Feb 09 2022 20:44:43 GMT-0700 (Mountain Standard Time)
at Wed Feb 09 2022 20:59:07 GMT-0700 (Mountain Standard Time)
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit 47a3a3a

Please sign in to comment.