34 lines
5.5 KiB
HTML
34 lines
5.5 KiB
HTML
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
.KEYW {color: #933;}
|
|
.COMM {color: #bbb; font-style: italic;}
|
|
.NUMB {color: #393;}
|
|
.STRN {color: #393;}
|
|
.REGX {color: #339;}
|
|
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
<span class='line'> 2</span> * Runner
|
|
<span class='line'> 3</span> *
|
|
<span class='line'> 4</span> * @constructor
|
|
<span class='line'> 5</span> * @param {jasmine.Env} env
|
|
<span class='line'> 6</span> */</span><span class="WHIT">
|
|
<span class='line'> 7</span> </span><span class="NAME">jasmine.Runner</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">env</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.ActionCollection.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 9</span>
|
|
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.suites</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.actions</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 11</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 12</span> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">jasmine.Runner</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.ActionCollection</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 13</span>
|
|
<span class='line'> 14</span> </span><span class="NAME">jasmine.Runner.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'> 15</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.env.reporter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportRunnerResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
<span class='line'> 18</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 19</span>
|
|
<span class='line'> 20</span> </span><span class="NAME">jasmine.Runner.prototype.getResults</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'> 21</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">results</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.NestedResults</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 22</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.suites.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'> 23</span> </span><span class="WHIT"> </span><span class="NAME">results.rollupCounts</span><span class="PUNC">(</span><span class="NAME">this.suites</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">getResults</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">results</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 26</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
<span class='line'> 27</span> </span></pre></body></html> |