Permalink
Browse files

fix(watch): Watch now works with instances of Date

  • Loading branch information...
calebdwilliams committed Aug 8, 2018
1 parent a010bb0 commit dcd8cf2b45b1d305709423212c59e772634b0643
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">82.6% </span>
<span class="strong">81.74% </span>
<span class="quiet">Statements</span>
<span class='fraction'>299/362</span>
<span class='fraction'>300/367</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.65% </span>
<span class="strong">69.76% </span>
<span class="quiet">Branches</span>
<span class='fraction'>140/201</span>
<span class='fraction'>143/205</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.37% </span>
<span class="strong">83.33% </span>
<span class="quiet">Functions</span>
<span class='fraction'>35/41</span>
<span class='fraction'>35/42</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.96% </span>
<span class="strong">84.01% </span>
<span class="quiet">Lines</span>
<span class='fraction'>288/339</span>
<span class='fraction'>289/344</span>
</div>
</div>
</div>
@@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="src/"><a href="src/index.html">src/</a></td>
<td data-value="82.6" class="pic high"><div class="chart"><div class="cover-fill" style="width: 82%;"></div><div class="cover-empty" style="width:18%;"></div></div></td>
<td data-value="82.6" class="pct high">82.6%</td>
<td data-value="362" class="abs high">299/362</td>
<td data-value="69.65" class="pct medium">69.65%</td>
<td data-value="201" class="abs medium">140/201</td>
<td data-value="85.37" class="pct high">85.37%</td>
<td data-value="41" class="abs high">35/41</td>
<td data-value="84.96" class="pct high">84.96%</td>
<td data-value="339" class="abs high">288/339</td>
<td data-value="81.74" class="pic high"><div class="chart"><div class="cover-fill" style="width: 81%;"></div><div class="cover-empty" style="width:19%;"></div></div></td>
<td data-value="81.74" class="pct high">81.74%</td>
<td data-value="367" class="abs high">300/367</td>
<td data-value="69.76" class="pct medium">69.76%</td>
<td data-value="205" class="abs medium">143/205</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="42" class="abs high">35/42</td>
<td data-value="84.01" class="pct high">84.01%</td>
<td data-value="344" class="abs high">289/344</td>
</tr>

</tbody>
@@ -77,7 +77,7 @@ <h1>
</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 Thu Aug 02 2018 20:16:19 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Aug 07 2018 19:49:24 GMT-0500 (CDT)
</div>
</div>
<script src="prettify.js"></script>
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">82.6% </span>
<span class="strong">81.74% </span>
<span class="quiet">Statements</span>
<span class='fraction'>299/362</span>
<span class='fraction'>300/367</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.65% </span>
<span class="strong">69.76% </span>
<span class="quiet">Branches</span>
<span class='fraction'>140/201</span>
<span class='fraction'>143/205</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.37% </span>
<span class="strong">83.33% </span>
<span class="quiet">Functions</span>
<span class='fraction'>35/41</span>
<span class='fraction'>35/42</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.96% </span>
<span class="strong">84.01% </span>
<span class="quiet">Lines</span>
<span class='fraction'>288/339</span>
<span class='fraction'>289/344</span>
</div>
</div>
</div>
@@ -60,15 +60,15 @@ <h1>
</thead>
<tbody><tr>
<td class="file high" data-value="templiteral.js"><a href="templiteral.js.html">templiteral.js</a></td>
<td data-value="82.6" class="pic high"><div class="chart"><div class="cover-fill" style="width: 82%;"></div><div class="cover-empty" style="width:18%;"></div></div></td>
<td data-value="82.6" class="pct high">82.6%</td>
<td data-value="362" class="abs high">299/362</td>
<td data-value="69.65" class="pct medium">69.65%</td>
<td data-value="201" class="abs medium">140/201</td>
<td data-value="85.37" class="pct high">85.37%</td>
<td data-value="41" class="abs high">35/41</td>
<td data-value="84.96" class="pct high">84.96%</td>
<td data-value="339" class="abs high">288/339</td>
<td data-value="81.74" class="pic high"><div class="chart"><div class="cover-fill" style="width: 81%;"></div><div class="cover-empty" style="width:19%;"></div></div></td>
<td data-value="81.74" class="pct high">81.74%</td>
<td data-value="367" class="abs high">300/367</td>
<td data-value="69.76" class="pct medium">69.76%</td>
<td data-value="205" class="abs medium">143/205</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="42" class="abs high">35/42</td>
<td data-value="84.01" class="pct high">84.01%</td>
<td data-value="344" class="abs high">289/344</td>
</tr>

</tbody>
@@ -77,7 +77,7 @@ <h1>
</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 Thu Aug 02 2018 20:16:19 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Aug 07 2018 19:49:24 GMT-0500 (CDT)
</div>
</div>
<script src="../prettify.js"></script>
@@ -20,24 +20,24 @@ <h1>
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">82.6% </span>
<span class="strong">81.74% </span>
<span class="quiet">Statements</span>
<span class='fraction'>299/362</span>
<span class='fraction'>300/367</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">69.65% </span>
<span class="strong">69.76% </span>
<span class="quiet">Branches</span>
<span class='fraction'>140/201</span>
<span class='fraction'>143/205</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">85.37% </span>
<span class="strong">83.33% </span>
<span class="quiet">Functions</span>
<span class='fraction'>35/41</span>
<span class='fraction'>35/42</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">84.96% </span>
<span class="strong">84.01% </span>
<span class="quiet">Lines</span>
<span class='fraction'>288/339</span>
<span class='fraction'>289/344</span>
</div>
</div>
</div>
@@ -663,7 +663,15 @@ <h1>
618
619
620
621</td><td class="line-coverage quiet"><span class="cline-any cline-yes">1×</span>
621
622
623
624
625
626
627
628
629</td><td class="line-coverage quiet"><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>
@@ -1234,6 +1242,9 @@ <h1>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1185×</span>
<span class="cline-any cline-yes">1185×</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1185×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">791×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1249,6 +1260,11 @@ <h1>
<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-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</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-neutral">&nbsp;</span>
<span class="cline-any cline-yes">44×</span>
<span class="cline-any cline-neutral">&nbsp;</span>
@@ -1807,7 +1823,7 @@ <h1>
}
&nbsp;
get $$renderListener() {
return debounce(this[this.constructor.renderer].bind(this), 100, true);
return debounce(this[this.constructor.renderer].bind(this), 0, true);
}

connectedCallback() {
@@ -1853,15 +1869,23 @@ <h1>
}
&nbsp;
try {
<span class="missing-if-branch" title="if path not taken" >I</span>if (typeof target[property] === 'function' &amp;&amp; target instanceof Date) {
<span class="cstat-no" title="statement not covered" > return new Proxy(target[property].bind(target), handler);</span>
}
return new Proxy(target[property], handler);
} catch (err) {
return Reflect.get(target, property, receiver);
}
},
defineProperty(target, property, descriptor) {
const define = Reflect.defineProperty(target, property, descriptor);
onChange(target, property, descriptor);
return define;
set(target, property, value) {
target[property] = value;
onChange(target, property, { value });
return true;
},
defineProperty<span class="fstat-no" title="function not covered" >(target, property, descriptor) {</span>
<span class="cstat-no" title="statement not covered" > const define = Reflect.defineProperty(target, property, descriptor);</span>
<span class="cstat-no" title="statement not covered" > onChange(target, property, descriptor);</span>
<span class="cstat-no" title="statement not covered" > return define;</span>
},
deleteProperty<span class="fstat-no" title="function not covered" >(target, property, descriptor) {</span>
<span class="cstat-no" title="statement not covered" > const deleted = Reflect.deleteProperty(target, property);</span>
@@ -1909,7 +1933,7 @@ <h1>
</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 Thu Aug 02 2018 20:16:19 GMT-0500 (CDT)
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Tue Aug 07 2018 19:49:24 GMT-0500 (CDT)
</div>
</div>
<script src="../prettify.js"></script>
@@ -523,7 +523,7 @@ class Component extends HTMLElement {
}

get $$renderListener() {
return debounce(this[this.constructor.renderer].bind(this), 100, true);
return debounce(this[this.constructor.renderer].bind(this), 0, true);
}

connectedCallback() {
@@ -569,6 +569,9 @@ const watch = (object, onChange) => {
}

try {
if (typeof target[property] === 'function' && target instanceof Date) {
return new Proxy(target[property].bind(target), handler);
}
return new Proxy(target[property], handler);
} catch (err) {
return Reflect.get(target, property, receiver);
Oops, something went wrong.

0 comments on commit dcd8cf2

Please sign in to comment.