jazrb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +134 -0
- data/bin/autojaz +4 -0
- data/bin/jazrb +230 -0
- data/doc/jasmine/files.html +460 -0
- data/doc/jasmine/index.html +322 -0
- data/doc/jasmine/symbols/_global_.html +1083 -0
- data/doc/jasmine/symbols/jasmine.Block.html +417 -0
- data/doc/jasmine/symbols/jasmine.Clock.html +678 -0
- data/doc/jasmine/symbols/jasmine.Env.html +1135 -0
- data/doc/jasmine/symbols/jasmine.EnvjsReporter.html +328 -0
- data/doc/jasmine/symbols/jasmine.JsApiReporter.html +822 -0
- data/doc/jasmine/symbols/jasmine.Matchers.html +1106 -0
- data/doc/jasmine/symbols/jasmine.MultiReporter.html +394 -0
- data/doc/jasmine/symbols/jasmine.NestedResults.html +710 -0
- data/doc/jasmine/symbols/jasmine.Reporter.html +574 -0
- data/doc/jasmine/symbols/jasmine.Runner.html +710 -0
- data/doc/jasmine/symbols/jasmine.Spec.html +1372 -0
- data/doc/jasmine/symbols/jasmine.Spy.html +855 -0
- data/doc/jasmine/symbols/jasmine.Suite.html +705 -0
- data/doc/jasmine/symbols/jasmine.XMLReporter.html +328 -0
- data/doc/jasmine/symbols/jasmine.html +1359 -0
- data/doc/jasmine/symbols/jasmine.util.html +535 -0
- data/doc/jasmine/symbols/src/lib_EnvjsReporter.js.html +149 -0
- data/doc/jasmine/symbols/src/lib_TrivialReporter.js.html +127 -0
- data/doc/jasmine/symbols/src/lib_XMLReporter.js.html +210 -0
- data/doc/jasmine/symbols/src/src_Block.js.html +35 -0
- data/doc/jasmine/symbols/src/src_Env.js.html +233 -0
- data/doc/jasmine/symbols/src/src_JsApiReporter.js.html +110 -0
- data/doc/jasmine/symbols/src/src_Matchers.js.html +399 -0
- data/doc/jasmine/symbols/src/src_MultiReporter.js.html +36 -0
- data/doc/jasmine/symbols/src/src_NestedResults.js.html +88 -0
- data/doc/jasmine/symbols/src/src_PrettyPrinter.js.html +128 -0
- data/doc/jasmine/symbols/src/src_Queue.js.html +119 -0
- data/doc/jasmine/symbols/src/src_Reporter.js.html +35 -0
- data/doc/jasmine/symbols/src/src_Reporters.js.html +51 -0
- data/doc/jasmine/symbols/src/src_Runner.js.html +75 -0
- data/doc/jasmine/symbols/src/src_Spec.js.html +228 -0
- data/doc/jasmine/symbols/src/src_Suite.js.html +77 -0
- data/doc/jasmine/symbols/src/src_WaitsBlock.js.html +21 -0
- data/doc/jasmine/symbols/src/src_WaitsForBlock.js.html +45 -0
- data/doc/jasmine/symbols/src/src_base.js.html +566 -0
- data/doc/jasmine/symbols/src/src_mock-timeout.js.html +185 -0
- data/doc/jasmine/symbols/src/src_util.js.html +75 -0
- data/lib/autotest/discover.rb +3 -0
- data/lib/autotest/jazrb.rb +55 -0
- data/lib/jazrb/intro.js +46 -0
- data/lib/jazrb/jasmine/EnvjsReporter.js +141 -0
- data/lib/jazrb/jasmine/TrivialReporter.js +155 -0
- data/lib/jazrb/jasmine/XMLReporter.js +241 -0
- data/lib/jazrb/jasmine/consolex.js +28 -0
- data/lib/jazrb/jasmine/jasmine-0.10.0.js +2526 -0
- data/lib/jazrb/jasmine/jasmine.js +2526 -0
- data/lib/jazrb/jasmine/json2.js +478 -0
- data/lib/jazrb/options.rb +26 -0
- data/lib/jazrb/outro.js +3 -0
- data/lib/jazrb/qintro.js +113 -0
- data/lib/jazrb/qoutro.js +3 -0
- data/lib/jazrb/qunit/qunit.css +17 -0
- data/lib/jazrb/qunit/qunit.js +1027 -0
- data/lib/jazrb.rb +0 -0
- data/spec/example/hello_world_spec.js +29 -0
- data/spec/example/nested/HelloWorldSpec.js +13 -0
- data/spec/example/nested/SpecHelper.js +1 -0
- data/spec/example/plain_spec.js +8 -0
- data/spec/example/spec_helper.js +1 -0
- data/spec/spec_helper.js +18 -0
- data/spec/spec_runner.js +143 -0
- data/test/jazrb_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- data/vendor/jasmine/MIT.LICENSE +20 -0
- data/vendor/jasmine/README.markdown +479 -0
- data/vendor/jasmine/Rakefile +155 -0
- data/vendor/jasmine/contrib/ruby/jasmine_runner.rb +334 -0
- data/vendor/jasmine/contrib/ruby/jasmine_spec_builder.rb +153 -0
- data/vendor/jasmine/contrib/ruby/run.html +47 -0
- data/vendor/jasmine/contrib/ruby/spec/jasmine_runner_spec.rb +71 -0
- data/vendor/jasmine/doc/files.html +460 -0
- data/vendor/jasmine/doc/index.html +322 -0
- data/vendor/jasmine/doc/symbols/_global_.html +1083 -0
- data/vendor/jasmine/doc/symbols/jasmine.Block.html +417 -0
- data/vendor/jasmine/doc/symbols/jasmine.Clock.html +678 -0
- data/vendor/jasmine/doc/symbols/jasmine.Env.html +1135 -0
- data/vendor/jasmine/doc/symbols/jasmine.EnvjsReporter.html +328 -0
- data/vendor/jasmine/doc/symbols/jasmine.JsApiReporter.html +822 -0
- data/vendor/jasmine/doc/symbols/jasmine.Matchers.html +1106 -0
- data/vendor/jasmine/doc/symbols/jasmine.MultiReporter.html +394 -0
- data/vendor/jasmine/doc/symbols/jasmine.NestedResults.html +710 -0
- data/vendor/jasmine/doc/symbols/jasmine.Reporter.html +574 -0
- data/vendor/jasmine/doc/symbols/jasmine.Runner.html +710 -0
- data/vendor/jasmine/doc/symbols/jasmine.Spec.html +1372 -0
- data/vendor/jasmine/doc/symbols/jasmine.Spy.html +855 -0
- data/vendor/jasmine/doc/symbols/jasmine.Suite.html +705 -0
- data/vendor/jasmine/doc/symbols/jasmine.XMLReporter.html +328 -0
- data/vendor/jasmine/doc/symbols/jasmine.html +1359 -0
- data/vendor/jasmine/doc/symbols/jasmine.util.html +535 -0
- data/vendor/jasmine/doc/symbols/src/lib_EnvjsReporter.js.html +149 -0
- data/vendor/jasmine/doc/symbols/src/lib_TrivialReporter.js.html +127 -0
- data/vendor/jasmine/doc/symbols/src/lib_XMLReporter.js.html +210 -0
- data/vendor/jasmine/doc/symbols/src/src_Block.js.html +35 -0
- data/vendor/jasmine/doc/symbols/src/src_Env.js.html +233 -0
- data/vendor/jasmine/doc/symbols/src/src_JsApiReporter.js.html +110 -0
- data/vendor/jasmine/doc/symbols/src/src_Matchers.js.html +399 -0
- data/vendor/jasmine/doc/symbols/src/src_MultiReporter.js.html +36 -0
- data/vendor/jasmine/doc/symbols/src/src_NestedResults.js.html +88 -0
- data/vendor/jasmine/doc/symbols/src/src_PrettyPrinter.js.html +128 -0
- data/vendor/jasmine/doc/symbols/src/src_Queue.js.html +119 -0
- data/vendor/jasmine/doc/symbols/src/src_Reporter.js.html +35 -0
- data/vendor/jasmine/doc/symbols/src/src_Reporters.js.html +51 -0
- data/vendor/jasmine/doc/symbols/src/src_Runner.js.html +75 -0
- data/vendor/jasmine/doc/symbols/src/src_Spec.js.html +228 -0
- data/vendor/jasmine/doc/symbols/src/src_Suite.js.html +77 -0
- data/vendor/jasmine/doc/symbols/src/src_WaitsBlock.js.html +21 -0
- data/vendor/jasmine/doc/symbols/src/src_WaitsForBlock.js.html +45 -0
- data/vendor/jasmine/doc/symbols/src/src_base.js.html +566 -0
- data/vendor/jasmine/doc/symbols/src/src_mock-timeout.js.html +185 -0
- data/vendor/jasmine/doc/symbols/src/src_util.js.html +75 -0
- data/vendor/jasmine/examples/html/example_suite.html +27 -0
- data/vendor/jasmine/examples/html/spec/example_suite.js +11 -0
- data/vendor/jasmine/examples/ruby/Rakefile +33 -0
- data/vendor/jasmine/examples/ruby/spec/example/example_spec.js +11 -0
- data/vendor/jasmine/examples/ruby/spec/jasmine_helper.rb +41 -0
- data/vendor/jasmine/examples/ruby/spec/jasmine_spec.rb +31 -0
- data/vendor/jasmine/examples/ruby/spec/saucelabs.yml +24 -0
- data/vendor/jasmine/geminstaller.yml +23 -0
- data/vendor/jasmine/images/fail-16.png +0 -0
- data/vendor/jasmine/images/fail.png +0 -0
- data/vendor/jasmine/images/go-16.png +0 -0
- data/vendor/jasmine/images/go.png +0 -0
- data/vendor/jasmine/images/pending-16.png +0 -0
- data/vendor/jasmine/images/pending.png +0 -0
- data/vendor/jasmine/images/question-bk.png +0 -0
- data/vendor/jasmine/images/questionbk-16.png +0 -0
- data/vendor/jasmine/images/spinner.gif +0 -0
- data/vendor/jasmine/jasmine.watchr +70 -0
- data/vendor/jasmine/lib/EnvjsReporter.js +141 -0
- data/vendor/jasmine/lib/TrivialReporter.js +155 -0
- data/vendor/jasmine/lib/XMLReporter.js +241 -0
- data/vendor/jasmine/lib/consolex.js +28 -0
- data/vendor/jasmine/lib/jasmine-0.10.0.js +2526 -0
- data/vendor/jasmine/lib/jasmine.css +86 -0
- data/vendor/jasmine/lib/json2.js +478 -0
- data/vendor/jasmine/spec/jasmine_helper.rb +44 -0
- data/vendor/jasmine/spec/jasmine_spec.rb +31 -0
- data/vendor/jasmine/spec/runner.html +43 -0
- data/vendor/jasmine/spec/runner.js +78 -0
- data/vendor/jasmine/spec/saucelabs.yml +24 -0
- data/vendor/jasmine/spec/suites/EnvSpec.js +71 -0
- data/vendor/jasmine/spec/suites/ExceptionsSpec.js +107 -0
- data/vendor/jasmine/spec/suites/JsApiReporterSpec.js +82 -0
- data/vendor/jasmine/spec/suites/MatchersSpec.js +589 -0
- data/vendor/jasmine/spec/suites/MockClockSpec.js +34 -0
- data/vendor/jasmine/spec/suites/MultiReporterSpec.js +30 -0
- data/vendor/jasmine/spec/suites/NestedResultsSpec.js +54 -0
- data/vendor/jasmine/spec/suites/PrettyPrintSpec.js +93 -0
- data/vendor/jasmine/spec/suites/QueueSpec.js +23 -0
- data/vendor/jasmine/spec/suites/ReporterSpec.js +60 -0
- data/vendor/jasmine/spec/suites/RunnerSpec.js +258 -0
- data/vendor/jasmine/spec/suites/SpecRunningSpec.js +1117 -0
- data/vendor/jasmine/spec/suites/SpecSpec.js +110 -0
- data/vendor/jasmine/spec/suites/SpySpec.js +187 -0
- data/vendor/jasmine/spec/suites/SuiteSpec.js +101 -0
- data/vendor/jasmine/spec/suites/TrivialReporterSpec.js +140 -0
- data/vendor/jasmine/spec/suites/UtilSpec.js +23 -0
- data/vendor/jasmine/src/Block.js +34 -0
- data/vendor/jasmine/src/Env.js +236 -0
- data/vendor/jasmine/src/JsApiReporter.js +103 -0
- data/vendor/jasmine/src/Matchers.js +326 -0
- data/vendor/jasmine/src/MultiReporter.js +28 -0
- data/vendor/jasmine/src/NestedResults.js +99 -0
- data/vendor/jasmine/src/PrettyPrinter.js +122 -0
- data/vendor/jasmine/src/Queue.js +210 -0
- data/vendor/jasmine/src/Reporter.js +27 -0
- data/vendor/jasmine/src/Reporters.js +43 -0
- data/vendor/jasmine/src/Runner.js +68 -0
- data/vendor/jasmine/src/Spec.js +254 -0
- data/vendor/jasmine/src/Suite.js +70 -0
- data/vendor/jasmine/src/WaitsBlock.js +13 -0
- data/vendor/jasmine/src/WaitsForBlock.js +38 -0
- data/vendor/jasmine/src/base.js +604 -0
- data/vendor/jasmine/src/mock-timeout.js +177 -0
- data/vendor/jasmine/src/util.js +67 -0
- data/vendor/jasmine/src/version.json +5 -0
- metadata +279 -0
@@ -0,0 +1,149 @@
|
|
1
|
+
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
2
|
+
.KEYW {color: #933;}
|
3
|
+
.COMM {color: #bbb; font-style: italic;}
|
4
|
+
.NUMB {color: #393;}
|
5
|
+
.STRN {color: #393;}
|
6
|
+
.REGX {color: #339;}
|
7
|
+
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
8
|
+
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/** JavaScript API reporter.
|
9
|
+
<span class='line'> 2</span> *
|
10
|
+
<span class='line'> 3</span> * @constructor
|
11
|
+
<span class='line'> 4</span> */</span><span class="WHIT">
|
12
|
+
<span class='line'> 5</span> </span><span class="NAME">jasmine.EnvjsReporter</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">
|
13
|
+
<span class='line'> 6</span> </span><span class="WHIT"> </span><span class="NAME">this.started</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
|
14
|
+
<span class='line'> 7</span> </span><span class="WHIT"> </span><span class="NAME">this.finished</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
|
15
|
+
<span class='line'> 8</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="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
16
|
+
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">this.results_</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">
|
17
|
+
<span class='line'> 10</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
18
|
+
<span class='line'> 11</span>
|
19
|
+
<span class='line'> 12</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.reportRunnerStarting</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">runner</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
20
|
+
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="NAME">this.started</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">
|
21
|
+
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suites</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runner.suites</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
22
|
+
<span class='line'> 15</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">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">
|
23
|
+
<span class='line'> 16</span> </span><span class="WHIT"> </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">suites</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
24
|
+
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="NAME">this.suites_.push</span><span class="PUNC">(</span><span class="NAME">this.summarize_</span><span class="PUNC">(</span><span class="NAME">suite</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
25
|
+
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
26
|
+
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">this.startedAt</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">Date</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
27
|
+
<span class='line'> 20</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
28
|
+
<span class='line'> 21</span>
|
29
|
+
<span class='line'> 22</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.suites</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">
|
30
|
+
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.suites_</span><span class="PUNC">;</span><span class="WHIT">
|
31
|
+
<span class='line'> 24</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
32
|
+
<span class='line'> 25</span>
|
33
|
+
<span class='line'> 26</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.summarize_</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">suiteOrSpec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
34
|
+
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">isSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suiteOrSpec</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Suite</span><span class="WHIT">
|
35
|
+
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">summary</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
36
|
+
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">suiteOrSpec.id</span><span class="PUNC">,</span><span class="WHIT">
|
37
|
+
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">suiteOrSpec.description</span><span class="PUNC">,</span><span class="WHIT">
|
38
|
+
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">isSuite</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'suite'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'spec'</span><span class="PUNC">,</span><span class="WHIT">
|
39
|
+
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="NAME">children</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="WHIT">
|
40
|
+
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
41
|
+
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
42
|
+
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suiteOrSpec.specs</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
43
|
+
<span class='line'> 36</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">specs.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">
|
44
|
+
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="NAME">summary.children.push</span><span class="PUNC">(</span><span class="NAME">this.summarize_</span><span class="PUNC">(</span><span class="NAME">specs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
45
|
+
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
46
|
+
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
47
|
+
<span class='line'> 40</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">summary</span><span class="PUNC">;</span><span class="WHIT">
|
48
|
+
<span class='line'> 41</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
49
|
+
<span class='line'> 42</span>
|
50
|
+
<span class='line'> 43</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.results</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">
|
51
|
+
<span class='line'> 44</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">
|
52
|
+
<span class='line'> 45</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
53
|
+
<span class='line'> 46</span>
|
54
|
+
<span class='line'> 47</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.resultsForSpec</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">specId</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
55
|
+
<span class='line'> 48</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="NAME">specId</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
56
|
+
<span class='line'> 49</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
57
|
+
<span class='line'> 50</span>
|
58
|
+
<span class='line'> 51</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
59
|
+
<span class='line'> 52</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.reportRunnerResults</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">runner</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
60
|
+
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="NAME">this.finished</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">
|
61
|
+
<span class='line'> 54</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="NAME">runner.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
62
|
+
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runner.specs</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
63
|
+
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specCount</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">specs.length</span><span class="PUNC">;</span><span class="WHIT">
|
64
|
+
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
65
|
+
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">count</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
|
66
|
+
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\x1b[31m"</span><span class="PUNC">;</span><span class="WHIT">
|
67
|
+
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">normal</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\x1b[0m"</span><span class="PUNC">;</span><span class="WHIT">
|
68
|
+
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\x1b[32m"</span><span class="PUNC">;</span><span class="WHIT">
|
69
|
+
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="KEYW">for</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="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.results_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
70
|
+
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.results_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
71
|
+
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">result.result</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"failed"</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
72
|
+
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">messages</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.messages</span><span class="PUNC">;</span><span class="WHIT">
|
73
|
+
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">messages</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
74
|
+
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectation</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">messages</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
75
|
+
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">expectation.passed</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
76
|
+
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
77
|
+
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">count</span><span class="PUNC">++</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">
|
78
|
+
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">red</span><span class="PUNC">+</span><span class="NAME">result.spec.description</span><span class="PUNC">+</span><span class="NAME">normal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
79
|
+
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">;</span><span class="WHIT">
|
80
|
+
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">expectation.message.replace</span><span class="PUNC">(</span><span class="REGX">/(<br \/>)+/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
81
|
+
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">red</span><span class="PUNC">+</span><span class="NAME">message</span><span class="PUNC">+</span><span class="NAME">normal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
82
|
+
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="NAME">print_exception</span><span class="PUNC">(</span><span class="NAME">expectation.trace</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
83
|
+
<span class='line'> 76</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
84
|
+
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
85
|
+
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
86
|
+
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
87
|
+
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\nFinished in "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">this.startedAt.getTime</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><span class="NUMB">1000</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"s"</span><span class="PUNC">;</span><span class="WHIT">
|
88
|
+
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
89
|
+
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"\n"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">specCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" spec"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">specCount</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</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="STRN">"s"</span><span class="WHIT"> </span><span class="PUNC">)</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">results.failedCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" failure"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">results.failedCount</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</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="STRN">"s"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
90
|
+
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">results.failedCount</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
|
91
|
+
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">red</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">;</span><span class="WHIT">
|
92
|
+
<span class='line'> 85</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">
|
93
|
+
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">green</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">;</span><span class="WHIT">
|
94
|
+
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
95
|
+
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="NAME">print</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">+</span><span class="NAME">normal</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
96
|
+
<span class='line'> 89</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
97
|
+
<span class='line'> 90</span>
|
98
|
+
<span class='line'> 91</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
99
|
+
<span class='line'> 92</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.reportSuiteResults</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">suite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
100
|
+
<span class='line'> 93</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
101
|
+
<span class='line'> 94</span>
|
102
|
+
<span class='line'> 95</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
103
|
+
<span class='line'> 96</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.reportSpecResults</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">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
104
|
+
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="NAME">puts</span><span class="PUNC">(</span><span class="NAME">spec.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">failedCount</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"\x1b[31mF\x1b[0m"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"\x1b[32m.\x1b[0m"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
105
|
+
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">this.results_</span><span class="PUNC">[</span><span class="NAME">spec.id</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
106
|
+
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">,</span><span class="WHIT">
|
107
|
+
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="NAME">messages</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">spec.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getItems</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
108
|
+
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">spec.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">failedCount</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"failed"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"passed"</span><span class="WHIT">
|
109
|
+
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
110
|
+
<span class='line'>103</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
111
|
+
<span class='line'>104</span>
|
112
|
+
<span class='line'>105</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
113
|
+
<span class='line'>106</span> </span><span class="NAME">jasmine.EnvjsReporter.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="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
114
|
+
<span class='line'>107</span> </span><span class="COMM">// print(str);</span><span class="WHIT">
|
115
|
+
<span class='line'>108</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
116
|
+
<span class='line'>109</span>
|
117
|
+
<span class='line'>110</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.resultsForSpecs</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">specIds</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
|
118
|
+
<span class='line'>111</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="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
119
|
+
<span class='line'>112</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">specIds.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">
|
120
|
+
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">specIds</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
121
|
+
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="NAME">results</span><span class="PUNC">[</span><span class="NAME">specId</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.summarizeResult_</span><span class="PUNC">(</span><span class="NAME">this.results_</span><span class="PUNC">[</span><span class="NAME">specId</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
122
|
+
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
123
|
+
<span class='line'>116</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">
|
124
|
+
<span class='line'>117</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
125
|
+
<span class='line'>118</span>
|
126
|
+
<span class='line'>119</span> </span><span class="NAME">jasmine.EnvjsReporter.prototype.summarizeResult_</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="PUNC">{</span><span class="WHIT">
|
127
|
+
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">summaryMessages</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">
|
128
|
+
<span class='line'>121</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">messageIndex</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">result.messages</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
129
|
+
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">resultMessage</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.messages</span><span class="PUNC">[</span><span class="NAME">messageIndex</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
130
|
+
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="NAME">summaryMessages.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
131
|
+
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.text</span><span class="PUNC">,</span><span class="WHIT">
|
132
|
+
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">passed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.passed</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">resultMessage.passed</span><span class="PUNC">(</span><span class="PUNC">)</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">
|
133
|
+
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.type</span><span class="PUNC">,</span><span class="WHIT">
|
134
|
+
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.message</span><span class="PUNC">,</span><span class="WHIT">
|
135
|
+
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="NAME">trace</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
136
|
+
<span class='line'>129</span> </span><span class="WHIT"> </span><span class="NAME">stack</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.passed</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">resultMessage.passed</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">resultMessage.trace.stack</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">undefined</span><span class="WHIT">
|
137
|
+
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
138
|
+
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
139
|
+
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
140
|
+
<span class='line'>133</span>
|
141
|
+
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">summaryResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
142
|
+
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">result.result</span><span class="PUNC">,</span><span class="WHIT">
|
143
|
+
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="NAME">messages</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">summaryMessages</span><span class="WHIT">
|
144
|
+
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
145
|
+
<span class='line'>138</span>
|
146
|
+
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">summaryResult</span><span class="PUNC">;</span><span class="WHIT">
|
147
|
+
<span class='line'>140</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
148
|
+
<span class='line'>141</span>
|
149
|
+
<span class='line'>142</span> </span></pre></body></html>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
2
|
+
.KEYW {color: #933;}
|
3
|
+
.COMM {color: #bbb; font-style: italic;}
|
4
|
+
.NUMB {color: #393;}
|
5
|
+
.STRN {color: #393;}
|
6
|
+
.REGX {color: #339;}
|
7
|
+
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
8
|
+
</style></head><body><pre><span class='line'> 1</span> <span class="NAME">jasmine.TrivialReporter</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">doc</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
9
|
+
<span class='line'> 2</span> </span><span class="WHIT"> </span><span class="NAME">this.document</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">doc</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">document</span><span class="PUNC">;</span><span class="WHIT">
|
10
|
+
<span class='line'> 3</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</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">
|
11
|
+
<span class='line'> 4</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
12
|
+
<span class='line'> 5</span>
|
13
|
+
<span class='line'> 6</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.createDom</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">type</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">childrenVarArgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
14
|
+
<span class='line'> 7</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">el</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="NAME">type</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
15
|
+
<span class='line'> 8</span>
|
16
|
+
<span class='line'> 9</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">2</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">arguments.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">
|
17
|
+
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
18
|
+
<span class='line'> 11</span>
|
19
|
+
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">child</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
20
|
+
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="NAME">el.appendChild</span><span class="PUNC">(</span><span class="NAME">document.createTextNode</span><span class="PUNC">(</span><span class="NAME">child</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
21
|
+
<span class='line'> 14</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">
|
22
|
+
<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">child</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">el.appendChild</span><span class="PUNC">(</span><span class="NAME">child</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
23
|
+
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
24
|
+
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
25
|
+
<span class='line'> 18</span>
|
26
|
+
<span class='line'> 19</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">attr</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
27
|
+
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">el</span><span class="PUNC">[</span><span class="NAME">attr</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">attrs</span><span class="PUNC">[</span><span class="NAME">attr</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
28
|
+
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
29
|
+
<span class='line'> 22</span>
|
30
|
+
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">el</span><span class="PUNC">;</span><span class="WHIT">
|
31
|
+
<span class='line'> 24</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
32
|
+
<span class='line'> 25</span>
|
33
|
+
<span class='line'> 26</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.reportRunnerStarting</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">runner</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
34
|
+
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suites</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runner.suites</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
35
|
+
<span class='line'> 28</span>
|
36
|
+
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">this.runnerDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'runner running'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
37
|
+
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'run_spec'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'?'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"run all"</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
38
|
+
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="NAME">this.runnerMessageSpan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'span'</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><span class="STRN">"Running..."</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
39
|
+
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="NAME">this.document.body.appendChild</span><span class="PUNC">(</span><span class="NAME">this.runnerDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
40
|
+
<span class='line'> 33</span>
|
41
|
+
<span class='line'> 34</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">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">
|
42
|
+
<span class='line'> 35</span> </span><span class="WHIT"> </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">suites</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
43
|
+
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suiteDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'suite'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
44
|
+
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'run_spec'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'?spec='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">encodeURIComponent</span><span class="PUNC">(</span><span class="NAME">suite.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"run"</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
45
|
+
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'description'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'?spec='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">encodeURIComponent</span><span class="PUNC">(</span><span class="NAME">suite.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.description</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
46
|
+
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">suite.getFullName</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><span class="NAME">suiteDiv</span><span class="PUNC">;</span><span class="WHIT">
|
47
|
+
<span class='line'> 40</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parentDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.document.body</span><span class="PUNC">;</span><span class="WHIT">
|
48
|
+
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
49
|
+
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="NAME">parentDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">suite.parentSuite.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
50
|
+
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
51
|
+
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="NAME">parentDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">suiteDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
52
|
+
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
53
|
+
<span class='line'> 46</span>
|
54
|
+
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">this.startedAt</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">Date</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
55
|
+
<span class='line'> 48</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
56
|
+
<span class='line'> 49</span>
|
57
|
+
<span class='line'> 50</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.reportRunnerResults</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">runner</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
58
|
+
<span class='line'> 51</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="NAME">runner.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
59
|
+
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">results.failedCount</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="PUNC">?</span><span class="WHIT"> </span><span class="STRN">"runner failed"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"runner passed"</span><span class="PUNC">;</span><span class="WHIT">
|
60
|
+
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="NAME">this.runnerDiv.setAttribute</span><span class="PUNC">(</span><span class="STRN">"class"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
61
|
+
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="COMM">//do it twice for IE</span><span class="WHIT">
|
62
|
+
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="NAME">this.runnerDiv.setAttribute</span><span class="PUNC">(</span><span class="STRN">"className"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
63
|
+
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">runner.specs</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
64
|
+
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specCount</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">
|
65
|
+
<span class='line'> 58</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">specs.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">
|
66
|
+
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.specFilter</span><span class="PUNC">(</span><span class="NAME">specs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
67
|
+
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="NAME">specCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
68
|
+
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
69
|
+
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
70
|
+
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">message</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">specCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" spec"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">specCount</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</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="STRN">"s"</span><span class="WHIT"> </span><span class="PUNC">)</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">results.failedCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" failure"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">results.failedCount</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</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="STRN">"s"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
71
|
+
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" in "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">this.startedAt.getTime</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><span class="NUMB">1000</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"s"</span><span class="PUNC">;</span><span class="WHIT">
|
72
|
+
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="NAME">this.runnerMessageSpan.replaceChild</span><span class="PUNC">(</span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'description'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</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><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.runnerMessageSpan.firstChild</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
73
|
+
<span class='line'> 66</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
74
|
+
<span class='line'> 67</span>
|
75
|
+
<span class='line'> 68</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.reportSuiteResults</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">suite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
76
|
+
<span class='line'> 69</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="NAME">suite.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
77
|
+
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">results.passed</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'passed'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'failed'</span><span class="PUNC">;</span><span class="WHIT">
|
78
|
+
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">results.totalCount</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="PUNC">{</span><span class="WHIT"> </span><span class="COMM">// todo: change this to check results.skipped</span><span class="WHIT">
|
79
|
+
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'skipped'</span><span class="PUNC">;</span><span class="WHIT">
|
80
|
+
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
81
|
+
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">suite.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">className</span><span class="WHIT"> </span><span class="PUNC">+</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">status</span><span class="PUNC">;</span><span class="WHIT">
|
82
|
+
<span class='line'> 75</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
83
|
+
<span class='line'> 76</span>
|
84
|
+
<span class='line'> 77</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.reportSpecResults</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">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
85
|
+
<span class='line'> 78</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="NAME">spec.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
86
|
+
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">results.passed</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'passed'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'failed'</span><span class="PUNC">;</span><span class="WHIT">
|
87
|
+
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">results.skipped</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
88
|
+
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="NAME">status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'skipped'</span><span class="PUNC">;</span><span class="WHIT">
|
89
|
+
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
90
|
+
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">specDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'spec '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">status</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
91
|
+
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'run_spec'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'?spec='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">encodeURIComponent</span><span class="PUNC">(</span><span class="NAME">spec.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"run"</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
92
|
+
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'a'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'description'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">href</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'?spec='</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">encodeURIComponent</span><span class="PUNC">(</span><span class="NAME">spec.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
93
|
+
<span class='line'> 86</span>
|
94
|
+
<span class='line'> 87</span>
|
95
|
+
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">resultItems</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">results.getItems</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
96
|
+
<span class='line'> 89</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">resultItems.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">
|
97
|
+
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">resultItems</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
98
|
+
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.passed</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">result.passed</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
99
|
+
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">resultMessageDiv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'resultMessage fail'</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
100
|
+
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="NAME">resultMessageDiv.innerHTML</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.message</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// todo: lame; mend</span><span class="WHIT">
|
101
|
+
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="NAME">specDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">resultMessageDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
102
|
+
<span class='line'> 95</span> </span><span class="WHIT"> </span><span class="NAME">specDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'div'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'stackTrace'</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">result.trace.stack</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
103
|
+
<span class='line'> 96</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
104
|
+
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
105
|
+
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">spec.suite.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">appendChild</span><span class="PUNC">(</span><span class="NAME">specDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
106
|
+
<span class='line'> 99</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
107
|
+
<span class='line'>100</span>
|
108
|
+
<span class='line'>101</span> </span><span class="NAME">jasmine.TrivialReporter.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">
|
109
|
+
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="NAME">this.console</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">console.log.apply</span><span class="PUNC">(</span><span class="NAME">console</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">
|
110
|
+
<span class='line'>103</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
111
|
+
<span class='line'>104</span>
|
112
|
+
<span class='line'>105</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.getLocation</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">
|
113
|
+
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.document.location</span><span class="PUNC">;</span><span class="WHIT">
|
114
|
+
<span class='line'>107</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
115
|
+
<span class='line'>108</span>
|
116
|
+
<span class='line'>109</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.specFilter</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">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
117
|
+
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">paramMap</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">
|
118
|
+
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">params</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getLocation</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">search.substring</span><span class="PUNC">(</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">'&'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
119
|
+
<span class='line'>112</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">params.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">
|
120
|
+
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">p</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">'='</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
121
|
+
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="NAME">paramMap</span><span class="PUNC">[</span><span class="NAME">decodeURIComponent</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">[</span><span class="NUMB">0</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><span class="NAME">decodeURIComponent</span><span class="PUNC">(</span><span class="NAME">p</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
122
|
+
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
123
|
+
<span class='line'>116</span>
|
124
|
+
<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="PUNC">!</span><span class="NAME">paramMap</span><span class="PUNC">[</span><span class="STRN">"spec"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
125
|
+
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spec.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">paramMap</span><span class="PUNC">[</span><span class="STRN">"spec"</span><span class="PUNC">]</span><span class="PUNC">)</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">
|
126
|
+
<span class='line'>119</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
127
|
+
<span class='line'>120</span> </span></pre></body></html>
|