Regenerate jsdoc.
This commit is contained in:
parent
8f5f6a6d27
commit
00296b02e0
|
@ -442,7 +442,7 @@ ul.inheritsList
|
|||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:45 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -316,7 +316,7 @@ ul.inheritsList
|
|||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:45 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1116,7 +1116,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -411,7 +411,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -301,6 +301,15 @@ ul.inheritsList
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="attributes"><static> </td>
|
||||
<td class="nameDescription">
|
||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.isInstalled">isInstalled</a></b>()
|
||||
</div>
|
||||
<div class="description"></div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="attributes"><static> </td>
|
||||
<td class="nameDescription">
|
||||
|
@ -451,6 +460,31 @@ ul.inheritsList
|
|||
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<a name=".isInstalled"> </a>
|
||||
<div class="fixedFont"><static>
|
||||
|
||||
|
||||
<span class="light">jasmine.Clock.</span><b>isInstalled</b>()
|
||||
|
||||
</div>
|
||||
<div class="description">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<a name=".reset"> </a>
|
||||
|
@ -672,7 +706,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1204,7 +1204,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -816,7 +816,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1461,7 +1461,7 @@ a pattern or a String.
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -388,7 +388,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -704,7 +704,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -568,7 +568,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -738,7 +738,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -405,7 +405,7 @@ ul.inheritsList
|
|||
<td class="nameDescription">
|
||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spec.html#log">log</a></b>()
|
||||
</div>
|
||||
<div class="description"></div>
|
||||
<div class="description">All parameters are pretty-printed and concatenated together, then written to the spec's output.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -955,7 +955,9 @@ ul.inheritsList
|
|||
|
||||
</div>
|
||||
<div class="description">
|
||||
All parameters are pretty-printed and concatenated together, then written to the spec's output.
|
||||
|
||||
Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -1202,7 +1204,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -849,7 +849,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:44 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -767,7 +767,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:45 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -397,7 +397,7 @@ ul.inheritsList
|
|||
<td class="nameDescription">
|
||||
<div class="fixedFont">jasmine.<b><a href="../symbols/jasmine.html#.log">log</a></b>()
|
||||
</div>
|
||||
<div class="description"></div>
|
||||
<div class="description">All parameters are pretty-printed and concatenated together, then written to the current spec's output.</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -883,7 +883,9 @@ large in one call.
|
|||
|
||||
</div>
|
||||
<div class="description">
|
||||
All parameters are pretty-printed and concatenated together, then written to the current spec's output.
|
||||
|
||||
Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
||||
|
||||
|
||||
</div>
|
||||
|
@ -1239,7 +1241,7 @@ large in one call.
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:46 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:43 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -529,7 +529,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Tue Jun 22 2010 17:46:47 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Jun 23 2010 11:30:45 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -44,169 +44,174 @@
|
|||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.results_</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 38</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 39</span>
|
||||
<span class='line'> 40</span> </span><span class="NAME">jasmine.Spec.prototype.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.results_.log</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 42</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 43</span>
|
||||
<span class='line'> 44</span> </span><span class="NAME">jasmine.Spec.prototype.runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">block</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 48</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 49</span>
|
||||
<span class='line'> 50</span> </span><span class="NAME">jasmine.Spec.prototype.addToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.insertNext</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'> 56</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 57</span>
|
||||
<span class='line'> 58</span> </span><span class="COMM">/**
|
||||
<span class='line'> 59</span> * @param {jasmine.ExpectationResult} result
|
||||
<span class='line'> 60</span> */</span><span class="WHIT">
|
||||
<span class='line'> 61</span> </span><span class="NAME">jasmine.Spec.prototype.addMatcherResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 63</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 64</span>
|
||||
<span class='line'> 65</span> </span><span class="NAME">jasmine.Spec.prototype.expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">positive.not</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 69</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 70</span>
|
||||
<span class='line'> 71</span> </span><span class="NAME">jasmine.Spec.prototype.waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 75</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 76</span>
|
||||
<span class='line'> 77</span> </span><span class="NAME">jasmine.Spec.prototype.waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsForFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsForBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsForFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 81</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 82</span>
|
||||
<span class='line'> 83</span> </span><span class="NAME">jasmine.Spec.prototype.fail</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectationResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.ExpectationResult</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="NAME">passed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">jasmine.util.formatException</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'Exception'</span><span class="WHIT">
|
||||
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">expectationResult</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 89</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 90</span>
|
||||
<span class='line'> 91</span> </span><span class="NAME">jasmine.Spec.prototype.getMatchersClass_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.env.matchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 93</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 94</span>
|
||||
<span class='line'> 95</span> </span><span class="NAME">jasmine.Spec.prototype.addMatchers</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 96</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">parent.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">newMatchersClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.wrapInto_</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>103</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>104</span>
|
||||
<span class='line'>105</span> </span><span class="NAME">jasmine.Spec.prototype.finishCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportSpecResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>107</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>108</span>
|
||||
<span class='line'>109</span> </span><span class="NAME">jasmine.Spec.prototype.finish</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="NAME">this.removeAllSpies</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="NAME">this.finishCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>115</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>116</span>
|
||||
<span class='line'>117</span> </span><span class="NAME">jasmine.Spec.prototype.after</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">doAfter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.unshift</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>123</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>124</span>
|
||||
<span class='line'>125</span> </span><span class="NAME">jasmine.Spec.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">spec.env.specFilter</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">spec.results_.skipped</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>129</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.log</span><span class="PUNC">(</span><span class="STRN">'>> Jasmine Running '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.suite.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'...'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>133</span>
|
||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">spec.env.currentSpec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>135</span>
|
||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="NAME">spec.addBeforesAndAftersToQueue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>137</span>
|
||||
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="NAME">spec.queue.start</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>141</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 40</span> </span><span class="COMM">/**
|
||||
<span class='line'> 41</span> * All parameters are pretty-printed and concatenated together, then written to the spec's output.
|
||||
<span class='line'> 42</span> *
|
||||
<span class='line'> 43</span> * Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
||||
<span class='line'> 44</span> */</span><span class="WHIT">
|
||||
<span class='line'> 45</span> </span><span class="NAME">jasmine.Spec.prototype.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.results_.log</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 47</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 48</span>
|
||||
<span class='line'> 49</span> </span><span class="NAME">jasmine.Spec.prototype.runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">block</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 53</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 54</span>
|
||||
<span class='line'> 55</span> </span><span class="NAME">jasmine.Spec.prototype.addToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.insertNext</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'> 61</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 62</span>
|
||||
<span class='line'> 63</span> </span><span class="COMM">/**
|
||||
<span class='line'> 64</span> * @param {jasmine.ExpectationResult} result
|
||||
<span class='line'> 65</span> */</span><span class="WHIT">
|
||||
<span class='line'> 66</span> </span><span class="NAME">jasmine.Spec.prototype.addMatcherResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 68</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 69</span>
|
||||
<span class='line'> 70</span> </span><span class="NAME">jasmine.Spec.prototype.expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">positive.not</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 74</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 75</span>
|
||||
<span class='line'> 76</span> </span><span class="NAME">jasmine.Spec.prototype.waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 80</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 81</span>
|
||||
<span class='line'> 82</span> </span><span class="NAME">jasmine.Spec.prototype.waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsForFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsForBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsForFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 86</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 87</span>
|
||||
<span class='line'> 88</span> </span><span class="NAME">jasmine.Spec.prototype.fail</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectationResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.ExpectationResult</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="NAME">passed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">jasmine.util.formatException</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'Exception'</span><span class="WHIT">
|
||||
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">expectationResult</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 94</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 95</span>
|
||||
<span class='line'> 96</span> </span><span class="NAME">jasmine.Spec.prototype.getMatchersClass_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.env.matchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 98</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 99</span>
|
||||
<span class='line'>100</span> </span><span class="NAME">jasmine.Spec.prototype.addMatchers</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">parent.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">newMatchersClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.wrapInto_</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>107</span> </span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>108</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>109</span>
|
||||
<span class='line'>110</span> </span><span class="NAME">jasmine.Spec.prototype.finishCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportSpecResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>112</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>113</span>
|
||||
<span class='line'>114</span> </span><span class="NAME">jasmine.Spec.prototype.finish</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="NAME">this.removeAllSpies</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>116</span> </span><span class="WHIT"> </span><span class="NAME">this.finishCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>120</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>121</span>
|
||||
<span class='line'>122</span> </span><span class="NAME">jasmine.Spec.prototype.after</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">doAfter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.unshift</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>128</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>129</span>
|
||||
<span class='line'>130</span> </span><span class="NAME">jasmine.Spec.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">spec.env.specFilter</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">spec.results_.skipped</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.log</span><span class="PUNC">(</span><span class="STRN">'>> Jasmine Running '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.suite.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'...'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>138</span>
|
||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="NAME">spec.env.currentSpec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>140</span>
|
||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="NAME">spec.addBeforesAndAftersToQueue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>142</span>
|
||||
<span class='line'>143</span> </span><span class="NAME">jasmine.Spec.prototype.addBeforesAndAftersToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.env.currentRunner</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>146</span>
|
||||
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>149</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>143</span> </span><span class="WHIT"> </span><span class="NAME">spec.queue.start</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>146</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>147</span>
|
||||
<span class='line'>148</span> </span><span class="NAME">jasmine.Spec.prototype.addBeforesAndAftersToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>149</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.env.currentRunner</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>151</span>
|
||||
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>166</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>167</span>
|
||||
<span class='line'>168</span> </span><span class="NAME">jasmine.Spec.prototype.explodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>169</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'explodes function should not have been called'</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>170</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>171</span>
|
||||
<span class='line'>172</span> </span><span class="NAME">jasmine.Spec.prototype.spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ignoreMethodDoesntExist</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"spyOn could not find an object to spy upon for "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"()"</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>167</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>168</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>169</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>171</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>172</span>
|
||||
<span class='line'>173</span> </span><span class="NAME">jasmine.Spec.prototype.explodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'explodes function should not have been called'</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>175</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>176</span>
|
||||
<span class='line'>177</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'() method does not exist'</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>180</span>
|
||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">isSpy</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>182</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' has already been spied upon'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>184</span>
|
||||
<span class='line'>185</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.createSpy</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>186</span>
|
||||
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_.push</span><span class="PUNC">(</span><span class="NAME">spyObj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>188</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.baseObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>189</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.methodName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>190</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.originalValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>177</span> </span><span class="NAME">jasmine.Spec.prototype.spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ignoreMethodDoesntExist</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"spyOn could not find an object to spy upon for "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"()"</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>181</span>
|
||||
<span class='line'>182</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'() method does not exist'</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>184</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>185</span>
|
||||
<span class='line'>186</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">isSpy</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' has already been spied upon'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>188</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>189</span>
|
||||
<span class='line'>190</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.createSpy</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>191</span>
|
||||
<span class='line'>192</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>193</span>
|
||||
<span class='line'>194</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>195</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>192</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_.push</span><span class="PUNC">(</span><span class="NAME">spyObj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>193</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.baseObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>194</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.methodName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>195</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.originalValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>196</span>
|
||||
<span class='line'>197</span> </span><span class="NAME">jasmine.Spec.prototype.removeAllSpies</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>198</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.spies_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>199</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>200</span> </span><span class="WHIT"> </span><span class="NAME">spy.baseObj</span><span class="PUNC">[</span><span class="NAME">spy.methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spy.originalValue</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>201</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>202</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>203</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>204</span>
|
||||
<span class='line'>205</span> </span></pre></body></html>
|
||||
<span class='line'>197</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>198</span>
|
||||
<span class='line'>199</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>200</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>201</span>
|
||||
<span class='line'>202</span> </span><span class="NAME">jasmine.Spec.prototype.removeAllSpies</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>203</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.spies_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>204</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>205</span> </span><span class="WHIT"> </span><span class="NAME">spy.baseObj</span><span class="PUNC">[</span><span class="NAME">spy.methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spy.originalValue</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>206</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>207</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>208</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>209</span>
|
||||
<span class='line'>210</span> </span></pre></body></html>
|
|
@ -57,7 +57,7 @@
|
|||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="COMM">// IE support</span><span class="WHIT">
|
||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">window</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'> 55</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 56</span>
|
||||
|
@ -416,169 +416,174 @@
|
|||
<span class='line'>409</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>410</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>411</span>
|
||||
<span class='line'>412</span> </span><span class="NAME">jasmine.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>413</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>414</span> </span><span class="WHIT"> </span><span class="NAME">spec.log.apply</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>415</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>416</span>
|
||||
<span class='line'>417</span> </span><span class="COMM">/**
|
||||
<span class='line'>418</span> * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
|
||||
<span class='line'>419</span> *
|
||||
<span class='line'>420</span> * @example
|
||||
<span class='line'>421</span> * // spy example
|
||||
<span class='line'>422</span> * var foo = {
|
||||
<span class='line'>423</span> * not: function(bool) { return !bool; }
|
||||
<span class='line'>424</span> * }
|
||||
<span class='line'>425</span> * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
|
||||
<span class='line'>426</span> *
|
||||
<span class='line'>427</span> * @see jasmine.createSpy
|
||||
<span class='line'>428</span> * @param obj
|
||||
<span class='line'>429</span> * @param methodName
|
||||
<span class='line'>430</span> * @returns a Jasmine spy that can be chained with all spy methods
|
||||
<span class='line'>431</span> */</span><span class="WHIT">
|
||||
<span class='line'>432</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>433</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.spyOn</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>434</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>435</span>
|
||||
<span class='line'>436</span> </span><span class="COMM">/**
|
||||
<span class='line'>437</span> * Creates a Jasmine spec that will be added to the current suite.
|
||||
<span class='line'>438</span> *
|
||||
<span class='line'>439</span> * // TODO: pending tests
|
||||
<span class='line'>440</span> *
|
||||
<span class='line'>441</span> * @example
|
||||
<span class='line'>442</span> * it('should be true', function() {
|
||||
<span class='line'>443</span> * expect(true).toEqual(true);
|
||||
<span class='line'>444</span> * });
|
||||
<span class='line'>412</span> </span><span class="COMM">/**
|
||||
<span class='line'>413</span> * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
|
||||
<span class='line'>414</span> *
|
||||
<span class='line'>415</span> * Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
||||
<span class='line'>416</span> */</span><span class="WHIT">
|
||||
<span class='line'>417</span> </span><span class="NAME">jasmine.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>418</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>419</span> </span><span class="WHIT"> </span><span class="NAME">spec.log.apply</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>420</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>421</span>
|
||||
<span class='line'>422</span> </span><span class="COMM">/**
|
||||
<span class='line'>423</span> * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
|
||||
<span class='line'>424</span> *
|
||||
<span class='line'>425</span> * @example
|
||||
<span class='line'>426</span> * // spy example
|
||||
<span class='line'>427</span> * var foo = {
|
||||
<span class='line'>428</span> * not: function(bool) { return !bool; }
|
||||
<span class='line'>429</span> * }
|
||||
<span class='line'>430</span> * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
|
||||
<span class='line'>431</span> *
|
||||
<span class='line'>432</span> * @see jasmine.createSpy
|
||||
<span class='line'>433</span> * @param obj
|
||||
<span class='line'>434</span> * @param methodName
|
||||
<span class='line'>435</span> * @returns a Jasmine spy that can be chained with all spy methods
|
||||
<span class='line'>436</span> */</span><span class="WHIT">
|
||||
<span class='line'>437</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>438</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.spyOn</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>439</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>440</span>
|
||||
<span class='line'>441</span> </span><span class="COMM">/**
|
||||
<span class='line'>442</span> * Creates a Jasmine spec that will be added to the current suite.
|
||||
<span class='line'>443</span> *
|
||||
<span class='line'>444</span> * // TODO: pending tests
|
||||
<span class='line'>445</span> *
|
||||
<span class='line'>446</span> * @param {String} desc description of this specification
|
||||
<span class='line'>447</span> * @param {Function} func defines the preconditions and expectations of the spec
|
||||
<span class='line'>448</span> */</span><span class="WHIT">
|
||||
<span class='line'>449</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">it</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>450</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">it</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>451</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>452</span>
|
||||
<span class='line'>453</span> </span><span class="COMM">/**
|
||||
<span class='line'>454</span> * Creates a <em>disabled</em> Jasmine spec.
|
||||
<span class='line'>455</span> *
|
||||
<span class='line'>456</span> * A convenience method that allows existing specs to be disabled temporarily during development.
|
||||
<span class='line'>457</span> *
|
||||
<span class='line'>458</span> * @param {String} desc description of this specification
|
||||
<span class='line'>459</span> * @param {Function} func defines the preconditions and expectations of the spec
|
||||
<span class='line'>460</span> */</span><span class="WHIT">
|
||||
<span class='line'>461</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>462</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xit</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>463</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>464</span>
|
||||
<span class='line'>465</span> </span><span class="COMM">/**
|
||||
<span class='line'>466</span> * Starts a chain for a Jasmine expectation.
|
||||
<span class='line'>467</span> *
|
||||
<span class='line'>468</span> * It is passed an Object that is the actual value and should chain to one of the many
|
||||
<span class='line'>469</span> * jasmine.Matchers functions.
|
||||
<span class='line'>470</span> *
|
||||
<span class='line'>471</span> * @param {Object} actual Actual value to test against and expected value
|
||||
<span class='line'>472</span> */</span><span class="WHIT">
|
||||
<span class='line'>473</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>474</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.expect</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>475</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>476</span>
|
||||
<span class='line'>477</span> </span><span class="COMM">/**
|
||||
<span class='line'>478</span> * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
|
||||
<span class='line'>479</span> *
|
||||
<span class='line'>480</span> * @param {Function} func Function that defines part of a jasmine spec.
|
||||
<span class='line'>481</span> */</span><span class="WHIT">
|
||||
<span class='line'>482</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>483</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.runs</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>484</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>485</span>
|
||||
<span class='line'>486</span> </span><span class="COMM">/**
|
||||
<span class='line'>487</span> * Waits for a timeout before moving to the next runs()-defined block.
|
||||
<span class='line'>488</span> * @param {Number} timeout
|
||||
<span class='line'>489</span> */</span><span class="WHIT">
|
||||
<span class='line'>490</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>491</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waits</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>492</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>493</span>
|
||||
<span class='line'>494</span> </span><span class="COMM">/**
|
||||
<span class='line'>495</span> * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
|
||||
<span class='line'>496</span> *
|
||||
<span class='line'>497</span> * @param {Number} timeout
|
||||
<span class='line'>498</span> * @param {Function} latchFunction
|
||||
<span class='line'>499</span> * @param {String} message
|
||||
<span class='line'>500</span> */</span><span class="WHIT">
|
||||
<span class='line'>501</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>502</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waitsFor</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>503</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>504</span>
|
||||
<span class='line'>505</span> </span><span class="COMM">/**
|
||||
<span class='line'>506</span> * A function that is called before each spec in a suite.
|
||||
<span class='line'>507</span> *
|
||||
<span class='line'>508</span> * Used for spec setup, including validating assumptions.
|
||||
<span class='line'>509</span> *
|
||||
<span class='line'>510</span> * @param {Function} beforeEachFunction
|
||||
<span class='line'>511</span> */</span><span class="WHIT">
|
||||
<span class='line'>512</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>513</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">beforeEach</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>514</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>515</span>
|
||||
<span class='line'>516</span> </span><span class="COMM">/**
|
||||
<span class='line'>517</span> * A function that is called after each spec in a suite.
|
||||
<span class='line'>518</span> *
|
||||
<span class='line'>519</span> * Used for restoring any state that is hijacked during spec execution.
|
||||
<span class='line'>520</span> *
|
||||
<span class='line'>521</span> * @param {Function} afterEachFunction
|
||||
<span class='line'>522</span> */</span><span class="WHIT">
|
||||
<span class='line'>523</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>524</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">afterEach</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>525</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>526</span>
|
||||
<span class='line'>527</span> </span><span class="COMM">/**
|
||||
<span class='line'>528</span> * Defines a suite of specifications.
|
||||
<span class='line'>529</span> *
|
||||
<span class='line'>530</span> * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
|
||||
<span class='line'>531</span> * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
||||
<span class='line'>532</span> * of setup in some tests.
|
||||
<span class='line'>533</span> *
|
||||
<span class='line'>534</span> * @example
|
||||
<span class='line'>535</span> * // TODO: a simple suite
|
||||
<span class='line'>536</span> *
|
||||
<span class='line'>537</span> * // TODO: a simple suite with a nested describe block
|
||||
<span class='line'>446</span> * @example
|
||||
<span class='line'>447</span> * it('should be true', function() {
|
||||
<span class='line'>448</span> * expect(true).toEqual(true);
|
||||
<span class='line'>449</span> * });
|
||||
<span class='line'>450</span> *
|
||||
<span class='line'>451</span> * @param {String} desc description of this specification
|
||||
<span class='line'>452</span> * @param {Function} func defines the preconditions and expectations of the spec
|
||||
<span class='line'>453</span> */</span><span class="WHIT">
|
||||
<span class='line'>454</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">it</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>455</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">it</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>456</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>457</span>
|
||||
<span class='line'>458</span> </span><span class="COMM">/**
|
||||
<span class='line'>459</span> * Creates a <em>disabled</em> Jasmine spec.
|
||||
<span class='line'>460</span> *
|
||||
<span class='line'>461</span> * A convenience method that allows existing specs to be disabled temporarily during development.
|
||||
<span class='line'>462</span> *
|
||||
<span class='line'>463</span> * @param {String} desc description of this specification
|
||||
<span class='line'>464</span> * @param {Function} func defines the preconditions and expectations of the spec
|
||||
<span class='line'>465</span> */</span><span class="WHIT">
|
||||
<span class='line'>466</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>467</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xit</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>468</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>469</span>
|
||||
<span class='line'>470</span> </span><span class="COMM">/**
|
||||
<span class='line'>471</span> * Starts a chain for a Jasmine expectation.
|
||||
<span class='line'>472</span> *
|
||||
<span class='line'>473</span> * It is passed an Object that is the actual value and should chain to one of the many
|
||||
<span class='line'>474</span> * jasmine.Matchers functions.
|
||||
<span class='line'>475</span> *
|
||||
<span class='line'>476</span> * @param {Object} actual Actual value to test against and expected value
|
||||
<span class='line'>477</span> */</span><span class="WHIT">
|
||||
<span class='line'>478</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>479</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.expect</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>480</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>481</span>
|
||||
<span class='line'>482</span> </span><span class="COMM">/**
|
||||
<span class='line'>483</span> * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
|
||||
<span class='line'>484</span> *
|
||||
<span class='line'>485</span> * @param {Function} func Function that defines part of a jasmine spec.
|
||||
<span class='line'>486</span> */</span><span class="WHIT">
|
||||
<span class='line'>487</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>488</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.runs</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>489</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>490</span>
|
||||
<span class='line'>491</span> </span><span class="COMM">/**
|
||||
<span class='line'>492</span> * Waits for a timeout before moving to the next runs()-defined block.
|
||||
<span class='line'>493</span> * @param {Number} timeout
|
||||
<span class='line'>494</span> */</span><span class="WHIT">
|
||||
<span class='line'>495</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>496</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waits</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>497</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>498</span>
|
||||
<span class='line'>499</span> </span><span class="COMM">/**
|
||||
<span class='line'>500</span> * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
|
||||
<span class='line'>501</span> *
|
||||
<span class='line'>502</span> * @param {Number} timeout
|
||||
<span class='line'>503</span> * @param {Function} latchFunction
|
||||
<span class='line'>504</span> * @param {String} message
|
||||
<span class='line'>505</span> */</span><span class="WHIT">
|
||||
<span class='line'>506</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>507</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waitsFor</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>508</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>509</span>
|
||||
<span class='line'>510</span> </span><span class="COMM">/**
|
||||
<span class='line'>511</span> * A function that is called before each spec in a suite.
|
||||
<span class='line'>512</span> *
|
||||
<span class='line'>513</span> * Used for spec setup, including validating assumptions.
|
||||
<span class='line'>514</span> *
|
||||
<span class='line'>515</span> * @param {Function} beforeEachFunction
|
||||
<span class='line'>516</span> */</span><span class="WHIT">
|
||||
<span class='line'>517</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>518</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">beforeEach</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>519</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>520</span>
|
||||
<span class='line'>521</span> </span><span class="COMM">/**
|
||||
<span class='line'>522</span> * A function that is called after each spec in a suite.
|
||||
<span class='line'>523</span> *
|
||||
<span class='line'>524</span> * Used for restoring any state that is hijacked during spec execution.
|
||||
<span class='line'>525</span> *
|
||||
<span class='line'>526</span> * @param {Function} afterEachFunction
|
||||
<span class='line'>527</span> */</span><span class="WHIT">
|
||||
<span class='line'>528</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>529</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">afterEach</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>530</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>531</span>
|
||||
<span class='line'>532</span> </span><span class="COMM">/**
|
||||
<span class='line'>533</span> * Defines a suite of specifications.
|
||||
<span class='line'>534</span> *
|
||||
<span class='line'>535</span> * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
|
||||
<span class='line'>536</span> * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
||||
<span class='line'>537</span> * of setup in some tests.
|
||||
<span class='line'>538</span> *
|
||||
<span class='line'>539</span> * @param {String} description A string, usually the class under test.
|
||||
<span class='line'>540</span> * @param {Function} specDefinitions function that defines several specs.
|
||||
<span class='line'>541</span> */</span><span class="WHIT">
|
||||
<span class='line'>542</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">describe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>543</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">describe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>544</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>545</span>
|
||||
<span class='line'>546</span> </span><span class="COMM">/**
|
||||
<span class='line'>547</span> * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
|
||||
<span class='line'>548</span> *
|
||||
<span class='line'>549</span> * @param {String} description A string, usually the class under test.
|
||||
<span class='line'>550</span> * @param {Function} specDefinitions function that defines several specs.
|
||||
<span class='line'>551</span> */</span><span class="WHIT">
|
||||
<span class='line'>552</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xdescribe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>553</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xdescribe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>554</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>555</span>
|
||||
<span class='line'>556</span>
|
||||
<span class='line'>557</span> </span><span class="COMM">// Provide the XMLHttpRequest class for IE 5.x-6.x:</span><span class="WHIT">
|
||||
<span class='line'>558</span> </span><span class="NAME">jasmine.XmlHttpRequest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>559</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>560</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.6.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>561</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>562</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>563</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>564</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.3.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>565</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>566</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>567</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>568</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>569</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>570</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>571</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>572</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Microsoft.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>573</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>574</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>575</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This browser does not support XMLHttpRequest."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>576</span> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>577</span> </span></pre></body></html>
|
||||
<span class='line'>539</span> * @example
|
||||
<span class='line'>540</span> * // TODO: a simple suite
|
||||
<span class='line'>541</span> *
|
||||
<span class='line'>542</span> * // TODO: a simple suite with a nested describe block
|
||||
<span class='line'>543</span> *
|
||||
<span class='line'>544</span> * @param {String} description A string, usually the class under test.
|
||||
<span class='line'>545</span> * @param {Function} specDefinitions function that defines several specs.
|
||||
<span class='line'>546</span> */</span><span class="WHIT">
|
||||
<span class='line'>547</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">describe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>548</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">describe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>549</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>550</span>
|
||||
<span class='line'>551</span> </span><span class="COMM">/**
|
||||
<span class='line'>552</span> * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
|
||||
<span class='line'>553</span> *
|
||||
<span class='line'>554</span> * @param {String} description A string, usually the class under test.
|
||||
<span class='line'>555</span> * @param {Function} specDefinitions function that defines several specs.
|
||||
<span class='line'>556</span> */</span><span class="WHIT">
|
||||
<span class='line'>557</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xdescribe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>558</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xdescribe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>559</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>560</span>
|
||||
<span class='line'>561</span>
|
||||
<span class='line'>562</span> </span><span class="COMM">// Provide the XMLHttpRequest class for IE 5.x-6.x:</span><span class="WHIT">
|
||||
<span class='line'>563</span> </span><span class="NAME">jasmine.XmlHttpRequest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>564</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>565</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.6.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>566</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>567</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>568</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>569</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.3.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>570</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>571</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>572</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>573</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>574</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>575</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>576</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>577</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Microsoft.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>578</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>579</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>580</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This browser does not support XMLHttpRequest."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>581</span> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>582</span> </span></pre></body></html>
|
|
@ -117,69 +117,76 @@
|
|||
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>111</span>
|
||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="NAME">useMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="NAME">spec.after</span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.uninstallMock</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>115</span>
|
||||
<span class='line'>116</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installMock</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>118</span>
|
||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="NAME">installMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>122</span>
|
||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="NAME">uninstallMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.assertInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>127</span>
|
||||
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">real</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>129</span> </span><span class="WHIT"> </span><span class="NAME">setTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="NAME">clearTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">setInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="NAME">clearInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT">
|
||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>134</span>
|
||||
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="NAME">assertInstalled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Mock clock is not installed, use jasmine.Clock.useMock()"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>140</span>
|
||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="NAME">installed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
|
||||
<span class='line'>142</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>143</span> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>144</span>
|
||||
<span class='line'>145</span> </span><span class="COMM">//else for IE support</span><span class="WHIT">
|
||||
<span class='line'>146</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>149</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>152</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>153</span>
|
||||
<span class='line'>154</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>160</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>161</span>
|
||||
<span class='line'>162</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>167</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>168</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>169</span>
|
||||
<span class='line'>170</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>172</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>176</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>177</span>
|
||||
<span class='line'>178</span> </span></pre></body></html>
|
||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.Clock.isInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="NAME">spec.after</span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.uninstallMock</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>116</span>
|
||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installMock</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>120</span>
|
||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">installMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>124</span>
|
||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">uninstallMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.log</span><span class="PUNC">(</span><span class="STRN">"uninstall"</span><span class="PUNC">)</span><span class="WHIT">
|
||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.assertInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>129</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>130</span>
|
||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">real</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="NAME">setTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">clearTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">setInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="NAME">clearInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT">
|
||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>137</span>
|
||||
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="NAME">assertInstalled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.Clock.isInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Mock clock is not installed, use jasmine.Clock.useMock()"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>142</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>143</span>
|
||||
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="NAME">isInstalled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>146</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'>147</span>
|
||||
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="NAME">installed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
|
||||
<span class='line'>149</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>150</span> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>151</span>
|
||||
<span class='line'>152</span> </span><span class="COMM">//else for IE support</span><span class="WHIT">
|
||||
<span class='line'>153</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>159</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>160</span>
|
||||
<span class='line'>161</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>167</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>168</span>
|
||||
<span class='line'>169</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>172</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>175</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>176</span>
|
||||
<span class='line'>177</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>182</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>183</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>184</span>
|
||||
<span class='line'>185</span> </span></pre></body></html>
|
Loading…
Reference in New Issue