Rakefile updates pages/index.html.
This commit is contained in:
parent
c533b67aa5
commit
dcc8b460d1
|
@ -1,4 +1,3 @@
|
||||||
.idea/
|
.idea/
|
||||||
.svn/
|
.svn/
|
||||||
dist/
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "pages"]
|
||||||
|
path = pages
|
||||||
|
url = git@github.com:pivotal/jasmine.git
|
|
@ -1,4 +1,4 @@
|
||||||
Jasmine
|
[Jasmine](http://pivotal.github.com/jasmine)
|
||||||
=======
|
=======
|
||||||
**A JavaScript Testing Framework**
|
**A JavaScript Testing Framework**
|
||||||
|
|
||||||
|
@ -479,4 +479,4 @@ We welcome your contributions! Jasmine is currently maintained by Davis Frank ([
|
||||||
## Acknowledgments
|
## Acknowledgments
|
||||||
* A big shout out to the various JavaScript test framework authors, especially TJ for [JSpec](http://github.com/visionmedia/jspec/tree/master) - we played with it a bit before deciding that we really needed to roll our own.
|
* A big shout out to the various JavaScript test framework authors, especially TJ for [JSpec](http://github.com/visionmedia/jspec/tree/master) - we played with it a bit before deciding that we really needed to roll our own.
|
||||||
* Thanks to Pivot [Jessica Miller](http://www.jessicamillerworks.com/) for our fancy pass/fail/pending icons
|
* Thanks to Pivot [Jessica Miller](http://www.jessicamillerworks.com/) for our fancy pass/fail/pending icons
|
||||||
* Huge contributions have been made by [Erik Hanson](mailto:erik@pivotallabs.com), [Adam Abrons](mailto:adam@pivotallabs.com) and [Carl Jackson](mailto:carl@pivotallabs.com), and many other Pivots.
|
* Huge contributions have been made by [Adam Abrons](mailto:adam@pivotallabs.com), [Lee Byrd](mailto:lee@pivotallabs.com), [Erik Hanson](mailto:erik@pivotallabs.com), and [Carl Jackson](mailto:carl@pivotallabs.com), and many other Pivots.
|
||||||
|
|
48
Rakefile
48
Rakefile
|
@ -28,7 +28,7 @@ end
|
||||||
namespace :jasmine do
|
namespace :jasmine do
|
||||||
|
|
||||||
desc 'Prepares for distribution'
|
desc 'Prepares for distribution'
|
||||||
task :dist => ['jasmine:build', 'jasmine:doc', 'jasmine:build_example_project']
|
task :dist => ['jasmine:build', 'jasmine:doc', 'jasmine:build_example_project', 'jasmine:fill_index_downloads']
|
||||||
|
|
||||||
desc 'Check jasmine sources for coding problems'
|
desc 'Check jasmine sources for coding problems'
|
||||||
task :lint do
|
task :lint do
|
||||||
|
@ -90,23 +90,31 @@ jasmine.version_= {
|
||||||
FileUtils.cp("src/html/jasmine.css", "lib/jasmine.css")
|
FileUtils.cp("src/html/jasmine.css", "lib/jasmine.css")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
task :need_pages_submodule do
|
||||||
|
unless File.exists?('pages/index.html')
|
||||||
|
raise "Jasmine pages submodule isn't present. Run git submodule update --init"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
desc "Build jasmine documentation"
|
desc "Build jasmine documentation"
|
||||||
task :doc do
|
task :doc => :need_pages_submodule do
|
||||||
puts 'Creating Jasmine Documentation'
|
puts 'Creating Jasmine Documentation'
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
#sudo gem install ragaskar-jsdoc_helper
|
#sudo gem install ragaskar-jsdoc_helper
|
||||||
require 'jsdoc_helper'
|
require 'jsdoc_helper'
|
||||||
|
|
||||||
|
FileUtils.rm_r "pages/jsdoc", :force => true
|
||||||
|
|
||||||
JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t|
|
JsdocHelper::Rake::Task.new(:lambda_jsdoc) do |t|
|
||||||
t[:files] = jasmine_sources << jasmine_html_sources
|
t[:files] = jasmine_sources << jasmine_html_sources
|
||||||
t[:options] = "-a"
|
t[:options] = "-a"
|
||||||
|
t[:out] = "pages/jsdoc"
|
||||||
end
|
end
|
||||||
Rake::Task[:lambda_jsdoc].invoke
|
Rake::Task[:lambda_jsdoc].invoke
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Build example project"
|
desc "Build example project"
|
||||||
task :build_example_project do
|
task :build_example_project => :need_pages_submodule do
|
||||||
require 'tmpdir'
|
require 'tmpdir'
|
||||||
|
|
||||||
temp_dir = File.join(Dir.tmpdir, 'jasmine-standalone-project')
|
temp_dir = File.join(Dir.tmpdir, 'jasmine-standalone-project')
|
||||||
|
@ -128,13 +136,41 @@ jasmine.version_= {
|
||||||
FileUtils.cp(File.join(root, src), File.join(lib_dir, dest))
|
FileUtils.cp(File.join(root, src), File.join(lib_dir, dest))
|
||||||
end
|
end
|
||||||
|
|
||||||
dist_dir = File.join(root, 'dist')
|
dist_dir = File.join(root, 'pages/downloads')
|
||||||
zip_file_name = File.join(dist_dir, "jasmine-standalone-#{jasmine_version}.zip")
|
zip_file_name = File.join(dist_dir, "jasmine-standalone-#{jasmine_version}.zip")
|
||||||
puts "Zipping Example Project and moving to #{zip_file_name}"
|
puts "Zipping Example Project and moving to #{zip_file_name}"
|
||||||
FileUtils.rm_r dist_dir if File.exists?(dist_dir)
|
FileUtils.mkdir(dist_dir) unless File.exist?(dist_dir)
|
||||||
Dir.mkdir(dist_dir)
|
if File.exist?(zip_file_name)
|
||||||
|
puts "WARNING!!! #{zip_file_name} already exists!"
|
||||||
|
FileUtils.rm(zip_file_name)
|
||||||
|
end
|
||||||
exec "cd #{temp_dir} && zip -r #{zip_file_name} . -x .[a-zA-Z0-9]*"
|
exec "cd #{temp_dir} && zip -r #{zip_file_name} . -x .[a-zA-Z0-9]*"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
task :fill_index_downloads do
|
||||||
|
require 'digest/sha1'
|
||||||
|
|
||||||
|
download_html = "<!-- START_DOWNLOADS -->\n"
|
||||||
|
download_html += "<table>\n<tr><th/><th>Version</th><th>Size</th><th>Date</th><th>SHA1</th></tr>\n"
|
||||||
|
Dir.glob('pages/downloads/*.zip').sort.reverse.each do |f|
|
||||||
|
sha1 = Digest::SHA1.hexdigest File.read(f)
|
||||||
|
|
||||||
|
fn = f.sub(/^pages\//, '')
|
||||||
|
version = /jasmine-standalone-(.*).zip/.match(f)[1]
|
||||||
|
download_html += "<td><a href='#{fn}'>#{fn.sub(/downloads\//, '')}</a></td>"
|
||||||
|
download_html += "<td>#{version}</td>\n"
|
||||||
|
download_html += "<td>#{File.size(f) / 1024}k</td>\n"
|
||||||
|
download_html += "<td>#{File.mtime(f).strftime("%Y/%m/%d %H:%M:%S")}</td>\n"
|
||||||
|
download_html += "<td>#{sha1}</td>\n"
|
||||||
|
end
|
||||||
|
download_html += "</table>\n<!-- END_DOWNLOADS -->"
|
||||||
|
|
||||||
|
index_page = File.read('pages/index.html')
|
||||||
|
matcher = /<!-- START_DOWNLOADS -->.*<!-- END_DOWNLOADS -->/m
|
||||||
|
index_page = index_page.sub(matcher, download_html)
|
||||||
|
File.open('pages/index.html', 'w') {|f| f.write(index_page)}
|
||||||
|
puts "rewrote that file"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task :jasmine => ['jasmine:dist']
|
task :jasmine => ['jasmine:dist']
|
||||||
|
|
448
doc/files.html
448
doc/files.html
|
@ -1,448 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - File Index</title>
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="index">
|
|
||||||
<div align="center"><a href="index.html">Class Index</a>
|
|
||||||
| <a href="files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<h1 class="classTitle">File Index</h1>
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_base.js.html">src/base.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Block.js.html">src/Block.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Env.js.html">src/Env.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_html_TrivialReporter.js.html">src/html/TrivialReporter.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_JsApiReporter.js.html">src/JsApiReporter.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Matchers.js.html">src/Matchers.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_mock-timeout.js.html">src/mock-timeout.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_MultiReporter.js.html">src/MultiReporter.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_NestedResults.js.html">src/NestedResults.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_PrettyPrinter.js.html">src/PrettyPrinter.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Queue.js.html">src/Queue.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Reporter.js.html">src/Reporter.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Runner.js.html">src/Runner.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Spec.js.html">src/Spec.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_Suite.js.html">src/Suite.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_util.js.html">src/util.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_WaitsBlock.js.html">src/WaitsBlock.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/src/src_WaitsForBlock.js.html">src/WaitsForBlock.js</a></h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:14 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
322
doc/index.html
322
doc/index.html
|
@ -1,322 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - Index</title>
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="index">
|
|
||||||
<div align="center"><a href="index.html">Class Index</a>
|
|
||||||
| <a href="files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<h1 class="classTitle">Class Index</h1>
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/_global_.html">_global_</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.html">jasmine</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Block.html">jasmine.Block</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Clock.html">jasmine.Clock</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Env.html">jasmine.Env</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Matchers.html">jasmine.Matchers</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Reporter.html">jasmine.Reporter</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Runner.html">jasmine.Runner</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Spec.html">jasmine.Spec</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Spy.html">jasmine.Spy</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.Suite.html">jasmine.Suite</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h2><a href="symbols/jasmine.util.html">jasmine.util</a></h2>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:14 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,417 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Block</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.Block
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_Block.js.html">Block.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Block.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Block.html">jasmine.Block</a></b>(env, func, spec)
|
|
||||||
</div>
|
|
||||||
<div class="description">Blocks are functions with executable code that make up a spec.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Block.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Block.html#execute">execute</a></b>(onComplete)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Block</b>(env, func, spec)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Blocks are functions with executable code that make up a spec.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.Env.html">jasmine.Env</a>}</span> <b>env</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{Function}</span> <b>func</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.Spec.html">jasmine.Spec</a>}</span> <b>spec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="execute"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>execute</b>(onComplete)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>onComplete</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:12 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,712 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Clock</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Namespace jasmine.Clock
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_mock-timeout.js.html">mock-timeout.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Clock.">
|
|
||||||
<caption>Namespace Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Clock.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.assertInstalled">assertInstalled</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.installMock">installMock</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.isInstalled">isInstalled</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.reset">reset</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.runFunctionsWithinRange">runFunctionsWithinRange</a></b>(oldMillis, nowMillis)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.scheduleFunction">scheduleFunction</a></b>(timeoutKey, funcToCall, millis, recurring)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.tick">tick</a></b>(millis)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.uninstallMock">uninstallMock</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.Clock.<b><a href="../symbols/jasmine.Clock.html#.useMock">useMock</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Namespace Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Clock</b>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name=".assertInstalled"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>assertInstalled</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".installMock"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>installMock</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".isInstalled"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>isInstalled</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".reset"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>reset</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".runFunctionsWithinRange"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>runFunctionsWithinRange</b>(oldMillis, nowMillis)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>oldMillis</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>nowMillis</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".scheduleFunction"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>scheduleFunction</b>(timeoutKey, funcToCall, millis, recurring)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>timeoutKey</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>funcToCall</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>millis</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>recurring</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".tick"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>tick</b>(millis)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>millis</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".uninstallMock"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>uninstallMock</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".useMock"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.Clock.</span><b>useMock</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:12 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,822 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.JsApiReporter</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.JsApiReporter
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_JsApiReporter.js.html">JsApiReporter.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.JsApiReporter.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">JavaScript API reporter.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.JsApiReporter.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#log">log</a></b>(str)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#reportRunnerResults">reportRunnerResults</a></b>(runner)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#reportRunnerStarting">reportRunnerStarting</a></b>(runner)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#reportSpecResults">reportSpecResults</a></b>(spec)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#reportSuiteResults">reportSuiteResults</a></b>(suite)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#results">results</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#resultsForSpec">resultsForSpec</a></b>(specId)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#resultsForSpecs">resultsForSpecs</a></b>(specIds)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#suites">suites</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#summarize_">summarize_</a></b>(suiteOrSpec)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.JsApiReporter.html#summarizeResult_">summarizeResult_</a></b>(result)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.JsApiReporter</b>()
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
JavaScript API reporter.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="log"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>log</b>(str)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>str</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportRunnerResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportRunnerResults</b>(runner)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>runner</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportRunnerStarting"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportRunnerStarting</b>(runner)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>runner</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportSpecResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportSpecResults</b>(spec)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>spec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportSuiteResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportSuiteResults</b>(suite)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>suite</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="results"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>results</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="resultsForSpec"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>resultsForSpec</b>(specId)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>specId</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="resultsForSpecs"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>resultsForSpecs</b>(specIds)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>specIds</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="suites"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>suites</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="summarize_"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>summarize_</b>(suiteOrSpec)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>suiteOrSpec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="summarizeResult_"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>summarizeResult_</b>(result)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>result</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:13 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,394 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.MultiReporter</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.MultiReporter
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_MultiReporter.js.html">MultiReporter.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.MultiReporter.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.MultiReporter.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.MultiReporter.html#addReporter">addReporter</a></b>(reporter)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.MultiReporter</b>()
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="addReporter"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>addReporter</b>(reporter)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>reporter</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:13 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,710 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.NestedResults</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.NestedResults
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_NestedResults.js.html">NestedResults.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.NestedResults.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">Holds results for a set of Jasmine spec.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class jasmine.NestedResults.">
|
|
||||||
<caption>Field Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Field Attributes</th>
|
|
||||||
<th scope="col">Field Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.NestedResults.html#failedCount">failedCount</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Number of failed results</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.NestedResults.html#passedCount">passedCount</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Number of passed results</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.NestedResults.html#skipped">skipped</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Was this suite/spec skipped?</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.NestedResults.html#totalCount">totalCount</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">The total count of results</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.NestedResults.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.NestedResults.html#addResult">addResult</a></b>(result)
|
|
||||||
</div>
|
|
||||||
<div class="description">Adds a result, tracking counts (total, passed, & failed)</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.NestedResults.html#getItems">getItems</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">Getter for the results: message & results.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.NestedResults.html#log">log</a></b>(values)
|
|
||||||
</div>
|
|
||||||
<div class="description">Adds a log message.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.NestedResults.html#passed">passed</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.NestedResults.html#rollupCounts">rollupCounts</a></b>(result)
|
|
||||||
</div>
|
|
||||||
<div class="description">Roll up the result counts.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.NestedResults</b>()
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Field Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="failedCount"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>failedCount</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Number of failed results
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="passedCount"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>passedCount</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Number of passed results
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="skipped"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>skipped</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Was this suite/spec skipped?
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="totalCount"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>totalCount</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
The total count of results
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="addResult"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>addResult</b>(result)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Adds a result, tracking counts (total, passed, & failed)
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.html#.ExpectationResult">jasmine.ExpectationResult</a>|<a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a>}</span> <b>result</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="getItems"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>getItems</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Getter for the results: message & results.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="log"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>log</b>(values)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Adds a log message.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>values</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd>Array of message parts which will be concatenated later.</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="passed"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
<span class="light">{Boolean}</span>
|
|
||||||
<b>passed</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Returns:</dt>
|
|
||||||
|
|
||||||
<dd><span class="light fixedFont">{Boolean}</span> True if <b>everything</b> below passed</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="rollupCounts"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>rollupCounts</b>(result)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Roll up the result counts.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>result</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:13 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,619 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Reporter</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.Reporter
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_Reporter.js.html">Reporter.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Reporter.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">No-op base class for Jasmine reporters.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Reporter.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#log">log</a></b>(str)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#reportRunnerResults">reportRunnerResults</a></b>(runner)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#reportRunnerStarting">reportRunnerStarting</a></b>(runner)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#reportSpecResults">reportSpecResults</a></b>(spec)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#reportSpecStarting">reportSpecStarting</a></b>(spec)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Reporter.html#reportSuiteResults">reportSuiteResults</a></b>(suite)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Reporter</b>()
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
No-op base class for Jasmine reporters.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="log"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>log</b>(str)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>str</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportRunnerResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportRunnerResults</b>(runner)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>runner</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportRunnerStarting"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportRunnerStarting</b>(runner)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>runner</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportSpecResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportSpecResults</b>(spec)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>spec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportSpecStarting"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportSpecStarting</b>(spec)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>spec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reportSuiteResults"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reportSuiteResults</b>(suite)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>suite</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:13 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,744 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Runner</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.Runner
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_Runner.js.html">Runner.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Runner.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></b>(env)
|
|
||||||
</div>
|
|
||||||
<div class="description">Runner</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Runner.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#add">add</a></b>(block)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#addSuite">addSuite</a></b>(suite)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#afterEach">afterEach</a></b>(afterEachFunction)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#beforeEach">beforeEach</a></b>(beforeEachFunction)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#execute">execute</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#finishCallback">finishCallback</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#results">results</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#specs">specs</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#suites">suites</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#topLevelSuites">topLevelSuites</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Runner</b>(env)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Runner
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.Env.html">jasmine.Env</a>}</span> <b>env</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="add"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>add</b>(block)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>block</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="addSuite"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>addSuite</b>(suite)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>suite</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="afterEach"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>afterEach</b>(afterEachFunction)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>afterEachFunction</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="beforeEach"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>beforeEach</b>(beforeEachFunction)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>beforeEachFunction</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="execute"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>execute</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="finishCallback"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>finishCallback</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="results"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>results</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="specs"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>specs</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="suites"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>suites</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="topLevelSuites"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>topLevelSuites</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:13 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,856 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Spy</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.Spy
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_base.js.html">base.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Spy.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></b>(name)
|
|
||||||
</div>
|
|
||||||
<div class="description">Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class jasmine.Spy.">
|
|
||||||
<caption>Field Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Field Attributes</th>
|
|
||||||
<th scope="col">Field Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Spy.html#argsForCall">argsForCall</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Holds arguments for each call to the spy, indexed by call count</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Spy.html#identity">identity</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">The name of the spy, if provided.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Spy.html#isSpy">isSpy</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Is this Object a spy?</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Spy.html#mostRecentCall">mostRecentCall</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description">Tracking of the most recent call to the spy.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Spy.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#andCallFake">andCallFake</a></b>(fakeFunc)
|
|
||||||
</div>
|
|
||||||
<div class="description">Calls an alternate implementation when a spy is called.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#andCallThrough">andCallThrough</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">Tells a spy to call through to the actual implemenatation.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#andReturn">andReturn</a></b>(value)
|
|
||||||
</div>
|
|
||||||
<div class="description">For setting the return value of a spy.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#andThrow">andThrow</a></b>(exceptionMsg)
|
|
||||||
</div>
|
|
||||||
<div class="description">For throwing an exception when a spy is called.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#plan">plan</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">The actual function this spy stubs.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Spy.html#reset">reset</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description">Resets all of a spy's the tracking variables so that it can be used again.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Spy</b>(name)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
|
||||||
|
|
||||||
Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
|
|
||||||
expectation syntax. Spies can be checked if they were called or not and what the calling params were.
|
|
||||||
|
|
||||||
A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
|
|
||||||
|
|
||||||
Spies are torn down at the end of every spec.
|
|
||||||
|
|
||||||
Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">// a stub
|
|
||||||
var myStub = jasmine.createSpy('myStub'); // can be used anywhere
|
|
||||||
|
|
||||||
// spy example
|
|
||||||
var foo = {
|
|
||||||
not: function(bool) { return !bool; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// actual foo.not will not be called, execution stops
|
|
||||||
spyOn(foo, 'not');
|
|
||||||
|
|
||||||
// foo.not spied upon, execution will continue to implementation
|
|
||||||
spyOn(foo, 'not').andCallThrough();
|
|
||||||
|
|
||||||
// fake example
|
|
||||||
var foo = {
|
|
||||||
not: function(bool) { return !bool; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// foo.not(val) will return val
|
|
||||||
spyOn(foo, 'not').andCallFake(function(value) {return value;});
|
|
||||||
|
|
||||||
// mock example
|
|
||||||
foo.not(7 == 7);
|
|
||||||
expect(foo.not).toHaveBeenCalled();
|
|
||||||
expect(foo.not).toHaveBeenCalledWith(true);</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{String}</span> <b>name</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">See:</dt>
|
|
||||||
|
|
||||||
<dd><a href="../symbols/_global_.html#spyOn">spyOn</a>, jasmine.createSpy, jasmine.createSpyObj</dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Field Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="argsForCall"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>argsForCall</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Holds arguments for each call to the spy, indexed by call count
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
|
||||||
mySpy(1, 2);
|
|
||||||
mySpy(7, 8);
|
|
||||||
mySpy.mostRecentCall.args = [7, 8];
|
|
||||||
mySpy.argsForCall[0] = [1, 2];
|
|
||||||
mySpy.argsForCall[1] = [7, 8];</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="identity"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>identity</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
The name of the spy, if provided.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="isSpy"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>isSpy</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Is this Object a spy?
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="mostRecentCall"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>mostRecentCall</b>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Tracking of the most recent call to the spy.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">var mySpy = jasmine.createSpy('foo');
|
|
||||||
mySpy(1, 2);
|
|
||||||
mySpy.mostRecentCall.args = [1, 2];</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="andCallFake"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>andCallFake</b>(fakeFunc)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Calls an alternate implementation when a spy is called.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">var baz = function() {
|
|
||||||
// do some stuff, return something
|
|
||||||
}
|
|
||||||
// defining a spy from scratch: foo() calls the function baz
|
|
||||||
var foo = jasmine.createSpy('spy on foo').andCall(baz);
|
|
||||||
|
|
||||||
// defining a spy on an existing property: foo.bar() calls an anonymnous function
|
|
||||||
spyOn(foo, 'bar').andCall(function() { return 'baz';} );</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{Function}</span> <b>fakeFunc</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="andCallThrough"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>andCallThrough</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Tells a spy to call through to the actual implemenatation.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">var foo = {
|
|
||||||
bar: function() { // do some stuff }
|
|
||||||
}
|
|
||||||
|
|
||||||
// defining a spy on an existing property: foo.bar
|
|
||||||
spyOn(foo, 'bar').andCallThrough();</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="andReturn"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>andReturn</b>(value)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
For setting the return value of a spy.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">// defining a spy from scratch: foo() returns 'baz'
|
|
||||||
var foo = jasmine.createSpy('spy on foo').andReturn('baz');
|
|
||||||
|
|
||||||
// defining a spy on an existing property: foo.bar() returns 'baz'
|
|
||||||
spyOn(foo, 'bar').andReturn('baz');</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{Object}</span> <b>value</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="andThrow"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>andThrow</b>(exceptionMsg)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
For throwing an exception when a spy is called.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">// defining a spy from scratch: foo() throws an exception w/ message 'ouch'
|
|
||||||
var foo = jasmine.createSpy('spy on foo').andThrow('baz');
|
|
||||||
|
|
||||||
// defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
|
|
||||||
spyOn(foo, 'bar').andThrow('baz');</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{String}</span> <b>exceptionMsg</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="plan"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>plan</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
The actual function this spy stubs.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="reset"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>reset</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
Resets all of a spy's the tracking variables so that it can be used again.
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<pre class="code">spyOn(foo, 'bar');
|
|
||||||
|
|
||||||
foo.bar();
|
|
||||||
|
|
||||||
expect(foo.bar.callCount).toEqual(1);
|
|
||||||
|
|
||||||
foo.bar.reset();
|
|
||||||
|
|
||||||
expect(foo.bar.callCount).toEqual(0);</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:14 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,773 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.Suite</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Class jasmine.Suite
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_Suite.js.html">Suite.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.Suite.">
|
|
||||||
<caption>Class Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></b>(env, description, specDefinitions, parentSuite)
|
|
||||||
</div>
|
|
||||||
<div class="description">Internal representation of a Jasmine suite.</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.Suite.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#add">add</a></b>(suiteOrSpec)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#afterEach">afterEach</a></b>(afterEachFunction)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#beforeEach">beforeEach</a></b>(beforeEachFunction)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#children">children</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#execute">execute</a></b>(onComplete)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#finish">finish</a></b>(onComplete)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#getFullName">getFullName</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#results">results</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#specs">specs</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#suites">suites</a></b>()
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Class Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.Suite</b>(env, description, specDefinitions, parentSuite)
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
Internal representation of a Jasmine suite.
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.Env.html">jasmine.Env</a>}</span> <b>env</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{String}</span> <b>description</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{Function}</span> <b>specDefinitions</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<span class="light fixedFont">{<a href="../symbols/jasmine.Suite.html">jasmine.Suite</a>}</span> <b>parentSuite</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name="add"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>add</b>(suiteOrSpec)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>suiteOrSpec</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="afterEach"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>afterEach</b>(afterEachFunction)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>afterEachFunction</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="beforeEach"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>beforeEach</b>(beforeEachFunction)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>beforeEachFunction</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="children"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>children</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="execute"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>execute</b>(onComplete)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>onComplete</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="finish"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>finish</b>(onComplete)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>onComplete</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="getFullName"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>getFullName</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="results"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>results</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="specs"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>specs</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name="suites"> </a>
|
|
||||||
<div class="fixedFont">
|
|
||||||
|
|
||||||
|
|
||||||
<b>suites</b>()
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:14 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,535 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
|
|
||||||
<title>JsDoc Reference - jasmine.util</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/* default.css */
|
|
||||||
body
|
|
||||||
{
|
|
||||||
font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif;
|
|
||||||
width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header
|
|
||||||
{
|
|
||||||
clear: both;
|
|
||||||
background-color: #ccc;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1
|
|
||||||
{
|
|
||||||
font-size: 150%;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0;
|
|
||||||
margin: 1em 0 0 .3em;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr
|
|
||||||
{
|
|
||||||
border: none 0;
|
|
||||||
border-top: 1px solid #7F8FB1;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.code
|
|
||||||
{
|
|
||||||
display: block;
|
|
||||||
padding: 8px;
|
|
||||||
border: 1px dashed #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
#index
|
|
||||||
{
|
|
||||||
margin-top: 24px;
|
|
||||||
float: left;
|
|
||||||
width: 160px;
|
|
||||||
position: absolute;
|
|
||||||
left: 8px;
|
|
||||||
background-color: #F3F3F3;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#content
|
|
||||||
{
|
|
||||||
margin-left: 190px;
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList
|
|
||||||
{
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 0 8px;
|
|
||||||
font-family: arial, sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.classList li
|
|
||||||
{
|
|
||||||
padding: 0;
|
|
||||||
margin: 0 0 8px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { width: 100%; }
|
|
||||||
|
|
||||||
h1.classTitle
|
|
||||||
{
|
|
||||||
font-size:170%;
|
|
||||||
line-height:130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 { font-size: 110%; }
|
|
||||||
caption, div.sectionTitle
|
|
||||||
{
|
|
||||||
background-color: #7F8FB1;
|
|
||||||
color: #fff;
|
|
||||||
font-size:130%;
|
|
||||||
text-align: left;
|
|
||||||
padding: 2px 6px 2px 6px;
|
|
||||||
border: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sectionTitle { margin-bottom: 8px; }
|
|
||||||
.summaryTable thead { display: none; }
|
|
||||||
|
|
||||||
.summaryTable td
|
|
||||||
{
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 4px;
|
|
||||||
border-bottom: 1px #7F8FB1 solid;
|
|
||||||
border-right: 1px #7F8FB1 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*col#summaryAttributes {}*/
|
|
||||||
.summaryTable td.attributes
|
|
||||||
{
|
|
||||||
border-left: 1px #7F8FB1 solid;
|
|
||||||
width: 140px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.attributes, .fixedFont
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
color: #002EBE;
|
|
||||||
font-family: "Courier New",Courier,monospace;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription
|
|
||||||
{
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable td.nameDescription, .description
|
|
||||||
{
|
|
||||||
line-height: 15px;
|
|
||||||
padding: 4px;
|
|
||||||
padding-left: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summaryTable { margin-bottom: 8px; }
|
|
||||||
|
|
||||||
ul.inheritsList
|
|
||||||
{
|
|
||||||
list-style: square;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detailList {
|
|
||||||
margin-left: 20px;
|
|
||||||
line-height: 15px;
|
|
||||||
}
|
|
||||||
.detailList dt { margin-left: 20px; }
|
|
||||||
|
|
||||||
.detailList .heading
|
|
||||||
{
|
|
||||||
font-weight: bold;
|
|
||||||
padding-bottom: 6px;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.light, td.attributes, .light a:link, .light a:visited
|
|
||||||
{
|
|
||||||
color: #777;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fineprint
|
|
||||||
{
|
|
||||||
text-align: right;
|
|
||||||
font-size: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<!-- ============================== header ================================= -->
|
|
||||||
<!-- begin static/header.html -->
|
|
||||||
<div id="header">
|
|
||||||
</div>
|
|
||||||
<!-- end static/header.html -->
|
|
||||||
|
|
||||||
<!-- ============================== classes index ============================ -->
|
|
||||||
<div id="index">
|
|
||||||
<!-- begin publish.classesIndex -->
|
|
||||||
<div align="center"><a href="../index.html">Class Index</a>
|
|
||||||
| <a href="../files.html">File Index</a></div>
|
|
||||||
<hr />
|
|
||||||
<h2>Classes</h2>
|
|
||||||
<ul class="classList">
|
|
||||||
|
|
||||||
<li><i><a href="../symbols/_global_.html">_global_</a></i></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.html">jasmine</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Block.html">jasmine.Block</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Clock.html">jasmine.Clock</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Env.html">jasmine.Env</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.JsApiReporter.html">jasmine.JsApiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Matchers.html">jasmine.Matchers</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.MultiReporter.html">jasmine.MultiReporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.NestedResults.html">jasmine.NestedResults</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Reporter.html">jasmine.Reporter</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Runner.html">jasmine.Runner</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spec.html">jasmine.Spec</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Spy.html">jasmine.Spy</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.Suite.html">jasmine.Suite</a></li>
|
|
||||||
|
|
||||||
<li><a href="../symbols/jasmine.util.html">jasmine.util</a></li>
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<!-- end publish.classesIndex -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="content">
|
|
||||||
<!-- ============================== class title ============================ -->
|
|
||||||
<h1 class="classTitle">
|
|
||||||
|
|
||||||
Namespace jasmine.util
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<!-- ============================== class summary ========================== -->
|
|
||||||
<p class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br /><i>Defined in: </i> <a href="../symbols/src/src_util.js.html">util.js</a>.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<!-- ============================== constructor summary ==================== -->
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class jasmine.util.">
|
|
||||||
<caption>Namespace Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Constructor Attributes</th>
|
|
||||||
<th scope="col">Constructor Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"> </td>
|
|
||||||
<td class="nameDescription" >
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b><a href="../symbols/jasmine.util.html">jasmine.util</a></b>
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== properties summary ===================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== methods summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class jasmine.util.">
|
|
||||||
<caption>Method Summary</caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col">Method Attributes</th>
|
|
||||||
<th scope="col">Method Name and Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.util.<b><a href="../symbols/jasmine.util.html#.argsToArray">argsToArray</a></b>(args)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.util.<b><a href="../symbols/jasmine.util.html#.extend">extend</a></b>(destination, source)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.util.<b><a href="../symbols/jasmine.util.html#.formatException">formatException</a></b>(e)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td class="attributes"><static> </td>
|
|
||||||
<td class="nameDescription">
|
|
||||||
<div class="fixedFont">jasmine.util.<b><a href="../symbols/jasmine.util.html#.htmlEscape">htmlEscape</a></b>(str)
|
|
||||||
</div>
|
|
||||||
<div class="description"></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== events summary ======================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== constructor details ==================== -->
|
|
||||||
|
|
||||||
<div class="details"><a name="constructor"> </a>
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Namespace Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="fixedFont">
|
|
||||||
<b>jasmine.util</b>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== field details ========================== -->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== method details ========================= -->
|
|
||||||
|
|
||||||
<div class="sectionTitle">
|
|
||||||
Method Detail
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a name=".argsToArray"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.util.</span><b>argsToArray</b>(args)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>args</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".extend"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.util.</span><b>extend</b>(destination, source)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>destination</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>source</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".formatException"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.util.</span><b>formatException</b>(e)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>e</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
|
|
||||||
<a name=".htmlEscape"> </a>
|
|
||||||
<div class="fixedFont"><static>
|
|
||||||
|
|
||||||
|
|
||||||
<span class="light">jasmine.util.</span><b>htmlEscape</b>(str)
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="description">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<dl class="detailList">
|
|
||||||
<dt class="heading">Parameters:</dt>
|
|
||||||
|
|
||||||
<dt>
|
|
||||||
<b>str</b>
|
|
||||||
|
|
||||||
</dt>
|
|
||||||
<dd></dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== event details ========================= -->
|
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============================== footer ================================= -->
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Jun 25 2010 15:15:14 GMT-0700 (PDT)
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,29 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Blocks are functions with executable code that make up a spec.
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> * @param {jasmine.Env} env
|
|
||||||
<span class='line'> 6</span> * @param {Function} func
|
|
||||||
<span class='line'> 7</span> * @param {jasmine.Spec} spec
|
|
||||||
<span class='line'> 8</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.Block</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="NAME">this.func</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="NAME">this.spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span>
|
|
||||||
<span class='line'> 15</span> </span><span class="NAME">jasmine.Block.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="NAME">this.func.apply</span><span class="PUNC">(</span><span class="NAME">this.spec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">this.spec.fail</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
|
|
|
@ -1,271 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Environment for Jasmine
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span> </span><span class="NAME">jasmine.Env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSpec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">this.currentRunner_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Runner</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span>
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="NAME">this.reporter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.MultiReporter</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span>
|
|
||||||
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="NAME">this.updateInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.DEFAULT_UPDATE_INTERVAL</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="NAME">this.lastUpdate</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 class='line'> 15</span> </span><span class="WHIT"> </span><span class="NAME">this.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="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span>
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">this.nextSpecId_</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 class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">this.nextSuiteId_</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 class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">this.equalityTesters_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span>
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="COMM">// wrap matchers</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">this.matchersClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span>
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.wrapInto_</span><span class="PUNC">(</span><span class="NAME">jasmine.Matchers.prototype</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span>
|
|
||||||
<span class='line'> 32</span>
|
|
||||||
<span class='line'> 33</span> </span><span class="NAME">jasmine.Env.prototype.setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.setTimeout</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="NAME">jasmine.Env.prototype.clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.clearTimeout</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="NAME">jasmine.Env.prototype.setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.setInterval</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="NAME">jasmine.Env.prototype.clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.clearInterval</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span>
|
|
||||||
<span class='line'> 38</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 39</span> * @returns an object containing jasmine version build info, if set.
|
|
||||||
<span class='line'> 40</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="NAME">jasmine.Env.prototype.version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.version_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.version_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Version not set'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span>
|
|
||||||
<span class='line'> 49</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 50</span> * @returns string containing jasmine version build info, if set.
|
|
||||||
<span class='line'> 51</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="NAME">jasmine.Env.prototype.versionString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.version_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.version</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">version.major</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">version.minor</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">version.build</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" revision "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">version.revision</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"version unknown"</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span>
|
|
||||||
<span class='line'> 61</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 62</span> * @returns a sequential integer starting at 0
|
|
||||||
<span class='line'> 63</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="NAME">jasmine.Env.prototype.nextSpecId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.nextSpecId_</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span>
|
|
||||||
<span class='line'> 68</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 69</span> * @returns a sequential integer starting at 0
|
|
||||||
<span class='line'> 70</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="NAME">jasmine.Env.prototype.nextSuiteId</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.nextSuiteId_</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span>
|
|
||||||
<span class='line'> 75</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 76</span> * Register a reporter to receive status updates from Jasmine.
|
|
||||||
<span class='line'> 77</span> * @param {jasmine.Reporter} reporter An object which will receive status updates.
|
|
||||||
<span class='line'> 78</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="NAME">jasmine.Env.prototype.addReporter</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">reporter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="NAME">this.reporter.addReporter</span><span class="PUNC">(</span><span class="NAME">reporter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span>
|
|
||||||
<span class='line'> 83</span> </span><span class="NAME">jasmine.Env.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">this.currentRunner_.execute</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span>
|
|
||||||
<span class='line'> 87</span> </span><span class="NAME">jasmine.Env.prototype.describe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 88</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="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Suite</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span>
|
|
||||||
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<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">parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="NAME">parentSuite.add</span><span class="PUNC">(</span><span class="NAME">suite</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="NAME">this.currentRunner_.add</span><span class="PUNC">(</span><span class="NAME">suite</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 96</span>
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span>
|
|
||||||
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">declarationError</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">specDefinitions.call</span><span class="PUNC">(</span><span class="NAME">suite</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">declarationError</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>105</span>
|
|
||||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>107</span>
|
|
||||||
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">declarationError</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span> </span><span class="WHIT"> </span><span class="NAME">this.it</span><span class="PUNC">(</span><span class="STRN">"encountered a declaration exception"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">declarationError</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>113</span>
|
|
||||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>115</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span>
|
|
||||||
<span class='line'>117</span> </span><span class="NAME">jasmine.Env.prototype.beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.currentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite.beforeEach</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">this.currentRunner_.beforeEach</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>124</span>
|
|
||||||
<span class='line'>125</span> </span><span class="NAME">jasmine.Env.prototype.currentRunner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.currentRunner_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>127</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>128</span>
|
|
||||||
<span class='line'>129</span> </span><span class="NAME">jasmine.Env.prototype.afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.currentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite.afterEach</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">this.currentRunner_.afterEach</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>135</span>
|
|
||||||
<span class='line'>136</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>137</span>
|
|
||||||
<span class='line'>138</span> </span><span class="NAME">jasmine.Env.prototype.xdescribe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="NAME">execute</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>142</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>143</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>144</span>
|
|
||||||
<span class='line'>145</span> </span><span class="NAME">jasmine.Env.prototype.it</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Spec</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.currentSuite</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSuite.add</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="NAME">this.currentSpec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>149</span>
|
|
||||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">spec.runs</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>153</span>
|
|
||||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>156</span>
|
|
||||||
<span class='line'>157</span> </span><span class="NAME">jasmine.Env.prototype.xit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.nextSpecId</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="NAME">runs</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>163</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>164</span>
|
|
||||||
<span class='line'>165</span> </span><span class="NAME">jasmine.Env.prototype.compareObjects_</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">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a.__Jasmine_been_here_before__</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">b.__Jasmine_been_here_before__</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span> </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">
|
|
||||||
<span class='line'>168</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>169</span>
|
|
||||||
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="NAME">a.__Jasmine_been_here_before__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="NAME">b.__Jasmine_been_here_before__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>172</span>
|
|
||||||
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hasKey</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">keyName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>174</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">keyName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>176</span>
|
|
||||||
<span class='line'>177</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">hasKey</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">property</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">hasKey</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">property</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="NAME">mismatchKeys.push</span><span class="PUNC">(</span><span class="STRN">"expected has key '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"', but missing from actual."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>182</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">hasKey</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">property</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">hasKey</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">property</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>184</span> </span><span class="WHIT"> </span><span class="NAME">mismatchKeys.push</span><span class="PUNC">(</span><span class="STRN">"expected missing key '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"', but present in actual."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>185</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>186</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>188</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'__Jasmine_been_here_before__'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>189</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">this.equals_</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>190</span> </span><span class="WHIT"> </span><span class="NAME">mismatchValues.push</span><span class="PUNC">(</span><span class="STRN">"'"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"' was '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">jasmine.util.htmlEscape</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">toString</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">b</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"' in expected, but was '"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">jasmine.util.htmlEscape</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">toString</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">a</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"' in actual."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>191</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>192</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>193</span>
|
|
||||||
<span class='line'>194</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">a.length</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">b.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>195</span> </span><span class="WHIT"> </span><span class="NAME">mismatchValues.push</span><span class="PUNC">(</span><span class="STRN">"arrays were not the same length"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>196</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>197</span>
|
|
||||||
<span class='line'>198</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">a.__Jasmine_been_here_before__</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>199</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">b.__Jasmine_been_here_before__</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>200</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">mismatchKeys.length</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="NAME">mismatchValues.length</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">
|
|
||||||
<span class='line'>201</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>202</span>
|
|
||||||
<span class='line'>203</span> </span><span class="NAME">jasmine.Env.prototype.equals_</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">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>204</span> </span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>205</span> </span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>206</span>
|
|
||||||
<span class='line'>207</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.equalityTesters_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>208</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">equalityTester</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.equalityTesters_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>209</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">equalityTester</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>210</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>211</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>212</span>
|
|
||||||
<span class='line'>213</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">b</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">
|
|
||||||
<span class='line'>214</span>
|
|
||||||
<span class='line'>215</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>216</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>217</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>218</span>
|
|
||||||
<span class='line'>219</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isDomNode</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">jasmine.isDomNode</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>220</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>221</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>222</span>
|
|
||||||
<span class='line'>223</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>224</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.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">b.getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>225</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>226</span>
|
|
||||||
<span class='line'>227</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.Any</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>228</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.matches</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>229</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>230</span>
|
|
||||||
<span class='line'>231</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">b</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.Any</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>232</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">b.matches</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>233</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>234</span>
|
|
||||||
<span class='line'>235</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isString_</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">jasmine.isString_</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>236</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>237</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>238</span>
|
|
||||||
<span class='line'>239</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isNumber_</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">jasmine.isNumber_</span><span class="PUNC">(</span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>240</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>241</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>242</span>
|
|
||||||
<span class='line'>243</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">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">b</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">"object"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>244</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.compareObjects_</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchKeys</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mismatchValues</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>245</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>246</span>
|
|
||||||
<span class='line'>247</span> </span><span class="WHIT"> </span><span class="COMM">//Straight check</span><span class="WHIT">
|
|
||||||
<span class='line'>248</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">a</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>249</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>250</span>
|
|
||||||
<span class='line'>251</span> </span><span class="NAME">jasmine.Env.prototype.contains_</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">haystack</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">needle</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>252</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">haystack</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>253</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">haystack.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>254</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.equals_</span><span class="PUNC">(</span><span class="NAME">haystack</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">needle</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">
|
|
||||||
<span class='line'>255</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>256</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>257</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>258</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">haystack.indexOf</span><span class="PUNC">(</span><span class="NAME">needle</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">
|
|
||||||
<span class='line'>259</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>260</span>
|
|
||||||
<span class='line'>261</span> </span><span class="NAME">jasmine.Env.prototype.addEqualityTester</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">equalityTester</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>262</span> </span><span class="WHIT"> </span><span class="NAME">this.equalityTesters_.push</span><span class="PUNC">(</span><span class="NAME">equalityTester</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>263</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>264</span> </span></pre></body></html>
|
|
|
@ -1,110 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/** JavaScript API reporter.
|
|
||||||
<span class='line'> 2</span> *
|
|
||||||
<span class='line'> 3</span> * @constructor
|
|
||||||
<span class='line'> 4</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span> </span><span class="NAME">jasmine.JsApiReporter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 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">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 10</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span>
|
|
||||||
<span class='line'> 12</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<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">
|
|
||||||
<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.topLevelSuites</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span>
|
|
||||||
<span class='line'> 21</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 22</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">
|
|
||||||
<span class='line'> 23</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span>
|
|
||||||
<span class='line'> 25</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 26</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="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</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">
|
|
||||||
<span class='line'> 28</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">
|
|
||||||
<span class='line'> 29</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">
|
|
||||||
<span class='line'> 30</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">
|
|
||||||
<span class='line'> 31</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">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </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">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suiteOrSpec.children</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<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">children.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 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">children</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">
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 41</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span>
|
|
||||||
<span class='line'> 43</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 45</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span>
|
|
||||||
<span class='line'> 47</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 49</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span>
|
|
||||||
<span class='line'> 51</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 54</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span>
|
|
||||||
<span class='line'> 56</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 58</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span>
|
|
||||||
<span class='line'> 60</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 62</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">
|
|
||||||
<span class='line'> 63</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">
|
|
||||||
<span class='line'> 64</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">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span>
|
|
||||||
<span class='line'> 68</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 70</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span>
|
|
||||||
<span class='line'> 72</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 73</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">
|
|
||||||
<span class='line'> 74</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">
|
|
||||||
<span class='line'> 75</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">
|
|
||||||
<span class='line'> 76</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">
|
|
||||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">results</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span>
|
|
||||||
<span class='line'> 81</span> </span><span class="NAME">jasmine.JsApiReporter.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">
|
|
||||||
<span class='line'> 82</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">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">messagesLength</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.messages.length</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</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="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">messageIndex</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">messagesLength</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">messageIndex</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</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">
|
|
||||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">summaryMessages.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">resultMessage.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'log'</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">resultMessage.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 88</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">
|
|
||||||
<span class='line'> 89</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">
|
|
||||||
<span class='line'> 90</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">
|
|
||||||
<span class='line'> 91</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">
|
|
||||||
<span class='line'> 92</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">jasmine.undefined</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 96</span>
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">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">
|
|
||||||
<span class='line'> 99</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">
|
|
||||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span>
|
|
||||||
<span class='line'>103</span> </span></pre></body></html>
|
|
|
@ -1,344 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * @constructor
|
|
||||||
<span class='line'> 3</span> * @param {jasmine.Env} env
|
|
||||||
<span class='line'> 4</span> * @param actual
|
|
||||||
<span class='line'> 5</span> * @param {jasmine.Spec} spec
|
|
||||||
<span class='line'> 6</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="NAME">jasmine.Matchers</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">opt_isNot</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="NAME">this.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="NAME">this.isNot</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">opt_isNot</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">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="NAME">this.reportWasCalled_</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">
|
|
||||||
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span>
|
|
||||||
<span class='line'> 15</span> </span><span class="COMM">// todo: @deprecated as of Jasmine 0.11, remove soon [xw]</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="NAME">jasmine.Matchers.pp</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">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span>
|
|
||||||
<span class='line'> 20</span> </span><span class="COMM">// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="NAME">jasmine.Matchers.prototype.report</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">failing_message</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">details</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span>
|
|
||||||
<span class='line'> 25</span> </span><span class="NAME">jasmine.Matchers.wrapInto_</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">prototype</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">matchersClass</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</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">methodName</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">prototype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'report'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">orig</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">prototype</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">matchersClass.prototype</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.matcherFn_</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">orig</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span>
|
|
||||||
<span class='line'> 33</span> </span><span class="NAME">jasmine.Matchers.matcherFn_</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">matcherName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">matcherFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">matcherArgs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.util.argsToArray</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</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">matcherFunction.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span>
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.isNot</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</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="PUNC">!</span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span>
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.reportWasCalled_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span>
|
|
||||||
<span class='line'> 44</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">
|
|
||||||
<span class='line'> 45</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">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</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">this.message.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</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">message</span><span class="PUNC">[</span><span class="NAME">this.isNot</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="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">englishyPredicate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">matcherName.replace</span><span class="PUNC">(</span><span class="REGX">/[A-Z]/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">s</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">s.toLowerCase</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="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</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">"Expected "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.isNot</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">" not "</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">englishyPredicate</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">matcherArgs.length</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 class='line'> 55</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">matcherArgs.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">","</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</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">" "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">matcherArgs</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 class='line'> 58</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</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">"."</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectationResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.ExpectationResult</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">matcherName</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">matcherName</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="NAME">passed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">matcherArgs.length</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="NAME">matcherArgs</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">matcherArgs</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="NAME">this.spec.addMatcherResult</span><span class="PUNC">(</span><span class="NAME">expectationResult</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span>
|
|
||||||
<span class='line'> 75</span>
|
|
||||||
<span class='line'> 76</span>
|
|
||||||
<span class='line'> 77</span>
|
|
||||||
<span class='line'> 78</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 79</span> * toBe: compares the actual to the expected using ===
|
|
||||||
<span class='line'> 80</span> * @param expected
|
|
||||||
<span class='line'> 81</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="NAME">jasmine.Matchers.prototype.toBe</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span>
|
|
||||||
<span class='line'> 86</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 87</span> * toNotBe: compares the actual to the expected using !==
|
|
||||||
<span class='line'> 88</span> * @param expected
|
|
||||||
<span class='line'> 89</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 90</span> </span><span class="NAME">jasmine.Matchers.prototype.toNotBe</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 92</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span>
|
|
||||||
<span class='line'> 94</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 95</span> * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc.
|
|
||||||
<span class='line'> 96</span> *
|
|
||||||
<span class='line'> 97</span> * @param expected
|
|
||||||
<span class='line'> 98</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 99</span> </span><span class="NAME">jasmine.Matchers.prototype.toEqual</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.env.equals_</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span>
|
|
||||||
<span class='line'>103</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>104</span> * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual
|
|
||||||
<span class='line'>105</span> * @param expected
|
|
||||||
<span class='line'>106</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>107</span> </span><span class="NAME">jasmine.Matchers.prototype.toNotEqual</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.env.equals_</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>110</span>
|
|
||||||
<span class='line'>111</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>112</span> * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
|
|
||||||
<span class='line'>113</span> * a pattern or a String.
|
|
||||||
<span class='line'>114</span> *
|
|
||||||
<span class='line'>115</span> * @param expected
|
|
||||||
<span class='line'>116</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>117</span> </span><span class="NAME">jasmine.Matchers.prototype.toMatch</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">RegExp</span><span class="PUNC">(</span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>119</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>120</span>
|
|
||||||
<span class='line'>121</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>122</span> * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
|
|
||||||
<span class='line'>123</span> * @param expected
|
|
||||||
<span class='line'>124</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>125</span> </span><span class="NAME">jasmine.Matchers.prototype.toNotMatch</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="KEYW">return</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">RegExp</span><span class="PUNC">(</span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">test</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>127</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>128</span>
|
|
||||||
<span class='line'>129</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>130</span> * Matcher that compares the actual to jasmine.undefined.
|
|
||||||
<span class='line'>131</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>132</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeDefined</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>134</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>135</span>
|
|
||||||
<span class='line'>136</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>137</span> * Matcher that compares the actual to jasmine.undefined.
|
|
||||||
<span class='line'>138</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>139</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeUndefined</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>141</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>142</span>
|
|
||||||
<span class='line'>143</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>144</span> * Matcher that compares the actual to null.
|
|
||||||
<span class='line'>145</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeNull</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>148</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>149</span>
|
|
||||||
<span class='line'>150</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>151</span> * Matcher that boolean not-nots the actual.
|
|
||||||
<span class='line'>152</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>153</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeTruthy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">!</span><span class="NAME">this.actual</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>156</span>
|
|
||||||
<span class='line'>157</span>
|
|
||||||
<span class='line'>158</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>159</span> * Matcher that boolean nots the actual.
|
|
||||||
<span class='line'>160</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>161</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeFalsy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.actual</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>163</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>164</span>
|
|
||||||
<span class='line'>165</span>
|
|
||||||
<span class='line'>166</span> </span><span class="COMM">/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span> </span><span class="NAME">jasmine.Matchers.prototype.wasCalled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>168</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.toHaveBeenCalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>169</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>170</span>
|
|
||||||
<span class='line'>171</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>172</span> * Matcher that checks to see if the actual, a Jasmine spy, was called.
|
|
||||||
<span class='line'>173</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>174</span> </span><span class="NAME">jasmine.Matchers.prototype.toHaveBeenCalled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</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 class='line'>176</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>177</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>178</span>
|
|
||||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.isSpy</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Expected a spy, but got '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual</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">
|
|
||||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>182</span>
|
|
||||||
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>184</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected spy "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.actual.identity</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" to have been called."</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>185</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>186</span>
|
|
||||||
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.actual.wasCalled</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>188</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>189</span>
|
|
||||||
<span class='line'>190</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>191</span> * Matcher that checks to see if the actual, a Jasmine spy, was not called.
|
|
||||||
<span class='line'>192</span> *
|
|
||||||
<span class='line'>193</span> * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead
|
|
||||||
<span class='line'>194</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>195</span> </span><span class="NAME">jasmine.Matchers.prototype.wasNotCalled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>196</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">arguments.length</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 class='line'>197</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'wasNotCalled does not take arguments'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>198</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>199</span>
|
|
||||||
<span class='line'>200</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.isSpy</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>201</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Expected a spy, but got '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual</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">
|
|
||||||
<span class='line'>202</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>203</span>
|
|
||||||
<span class='line'>204</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>205</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected spy "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.actual.identity</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" to not have been called."</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>206</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>207</span>
|
|
||||||
<span class='line'>208</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.actual.wasCalled</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>209</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>210</span>
|
|
||||||
<span class='line'>211</span> </span><span class="COMM">/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */</span><span class="WHIT">
|
|
||||||
<span class='line'>212</span> </span><span class="NAME">jasmine.Matchers.prototype.wasCalledWith</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>213</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.toHaveBeenCalledWith.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>214</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>215</span>
|
|
||||||
<span class='line'>216</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>217</span> * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters.
|
|
||||||
<span class='line'>218</span> *
|
|
||||||
<span class='line'>219</span> * @example
|
|
||||||
<span class='line'>220</span> *
|
|
||||||
<span class='line'>221</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>222</span> </span><span class="NAME">jasmine.Matchers.prototype.toHaveBeenCalledWith</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>223</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectedArgs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.util.argsToArray</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>224</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.isSpy</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>225</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Expected a spy, but got '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual</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">
|
|
||||||
<span class='line'>226</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>227</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>228</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.actual.callCount</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 class='line'>229</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected spy to have been called with "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">expectedArgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" but it was never called."</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>230</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>231</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected spy to have been called with "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">expectedArgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" but was called with "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual.argsForCall</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>232</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>233</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>234</span>
|
|
||||||
<span class='line'>235</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.env.contains_</span><span class="PUNC">(</span><span class="NAME">this.actual.argsForCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expectedArgs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>236</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>237</span>
|
|
||||||
<span class='line'>238</span> </span><span class="COMM">/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */</span><span class="WHIT">
|
|
||||||
<span class='line'>239</span> </span><span class="NAME">jasmine.Matchers.prototype.wasNotCalledWith</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>240</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectedArgs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.util.argsToArray</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>241</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.isSpy</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>242</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Expected a spy, but got '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.actual</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">
|
|
||||||
<span class='line'>243</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>244</span>
|
|
||||||
<span class='line'>245</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>246</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected spy not to have been called with "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">expectedArgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">" but it was"</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>247</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>248</span>
|
|
||||||
<span class='line'>249</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.env.contains_</span><span class="PUNC">(</span><span class="NAME">this.actual.argsForCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expectedArgs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>250</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>251</span>
|
|
||||||
<span class='line'>252</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>253</span> * Matcher that checks that the expected item is an element in the actual Array.
|
|
||||||
<span class='line'>254</span> *
|
|
||||||
<span class='line'>255</span> * @param {Object} expected
|
|
||||||
<span class='line'>256</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>257</span> </span><span class="NAME">jasmine.Matchers.prototype.toContain</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>258</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.env.contains_</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>259</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>260</span>
|
|
||||||
<span class='line'>261</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>262</span> * Matcher that checks that the expected item is NOT an element in the actual Array.
|
|
||||||
<span class='line'>263</span> *
|
|
||||||
<span class='line'>264</span> * @param {Object} expected
|
|
||||||
<span class='line'>265</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>266</span> </span><span class="NAME">jasmine.Matchers.prototype.toNotContain</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>267</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.env.contains_</span><span class="PUNC">(</span><span class="NAME">this.actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>268</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>269</span>
|
|
||||||
<span class='line'>270</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeLessThan</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>271</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>272</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>273</span>
|
|
||||||
<span class='line'>274</span> </span><span class="NAME">jasmine.Matchers.prototype.toBeGreaterThan</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>275</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>276</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>277</span>
|
|
||||||
<span class='line'>278</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>279</span> * Matcher that checks that the expected exception was thrown by the actual.
|
|
||||||
<span class='line'>280</span> *
|
|
||||||
<span class='line'>281</span> * @param {String} expected
|
|
||||||
<span class='line'>282</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>283</span> </span><span class="NAME">jasmine.Matchers.prototype.toThrow</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">expected</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>284</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="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>285</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">exception</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>286</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">this.actual</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>287</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'Actual is not a function'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>288</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>289</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>290</span> </span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>291</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>292</span> </span><span class="WHIT"> </span><span class="NAME">exception</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>293</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>294</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">exception</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>295</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="PUNC">(</span><span class="NAME">expected</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.env.equals_</span><span class="PUNC">(</span><span class="NAME">exception.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">exception</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>296</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>297</span>
|
|
||||||
<span class='line'>298</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>299</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">exception</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">expected</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="NAME">this.env.equals_</span><span class="PUNC">(</span><span class="NAME">exception.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">exception</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>300</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"Expected function to throw"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expected.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">expected</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">", but it threw"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">exception.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">exception</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="STRN">' '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>301</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>302</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"Expected function to throw an exception."</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>303</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>304</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>305</span>
|
|
||||||
<span class='line'>306</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">result</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>307</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>308</span>
|
|
||||||
<span class='line'>309</span> </span><span class="NAME">jasmine.Matchers.Any</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">expectedClass</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>310</span> </span><span class="WHIT"> </span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">expectedClass</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>311</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>312</span>
|
|
||||||
<span class='line'>313</span> </span><span class="NAME">jasmine.Matchers.Any.prototype.matches</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">other</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>314</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">String</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>315</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'string'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">String</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>316</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>317</span>
|
|
||||||
<span class='line'>318</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Number</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>319</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Number</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>320</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>321</span>
|
|
||||||
<span class='line'>322</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Function</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>323</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Function</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>324</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>325</span>
|
|
||||||
<span class='line'>326</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">Object</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>327</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>328</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>329</span>
|
|
||||||
<span class='line'>330</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">other</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">this.expectedClass</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>331</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>332</span>
|
|
||||||
<span class='line'>333</span> </span><span class="NAME">jasmine.Matchers.Any.prototype.toString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>334</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">'<jasmine.any('</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.expectedClass</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')>'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>335</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>336</span>
|
|
||||||
<span class='line'>337</span> </span></pre></body></html>
|
|
|
@ -1,43 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * @constructor
|
|
||||||
<span class='line'> 3</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="NAME">jasmine.MultiReporter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">this.subReporters_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">jasmine.MultiReporter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.Reporter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span>
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.MultiReporter.prototype.addReporter</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">reporter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.subReporters_.push</span><span class="PUNC">(</span><span class="NAME">reporter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span>
|
|
||||||
<span class='line'> 13</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">functionNames</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="STRN">"reportRunnerStarting"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="STRN">"reportRunnerResults"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="STRN">"reportSuiteResults"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="STRN">"reportSpecStarting"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="STRN">"reportSpecResults"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="STRN">"log"</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">functionNames.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">functionName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">functionNames</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.MultiReporter.prototype</span><span class="PUNC">[</span><span class="NAME">functionName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">functionName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</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">j</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">j</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.subReporters_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">subReporter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.subReporters_</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">subReporter</span><span class="PUNC">[</span><span class="NAME">functionName</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">subReporter</span><span class="PUNC">[</span><span class="NAME">functionName</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">apply</span><span class="PUNC">(</span><span class="NAME">subReporter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">functionName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span></pre></body></html>
|
|
|
@ -1,88 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span> </span><span class="NAME">jasmine.NestedResults</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 8</span> * The total count of results
|
|
||||||
<span class='line'> 9</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.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 class='line'> 11</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 12</span> * Number of passed results
|
|
||||||
<span class='line'> 13</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="NAME">this.passedCount</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 class='line'> 15</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 16</span> * Number of failed results
|
|
||||||
<span class='line'> 17</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">this.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 class='line'> 19</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 20</span> * Was this suite/spec skipped?
|
|
||||||
<span class='line'> 21</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="NAME">this.skipped</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">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 24</span> * @ignore
|
|
||||||
<span class='line'> 25</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="NAME">this.items_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span>
|
|
||||||
<span class='line'> 29</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 30</span> * Roll up the result counts.
|
|
||||||
<span class='line'> 31</span> *
|
|
||||||
<span class='line'> 32</span> * @param result
|
|
||||||
<span class='line'> 33</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="NAME">jasmine.NestedResults.prototype.rollupCounts</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="NAME">this.totalCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.totalCount</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="NAME">this.passedCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.passedCount</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="NAME">this.failedCount</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">result.failedCount</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span>
|
|
||||||
<span class='line'> 40</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 41</span> * Adds a log message.
|
|
||||||
<span class='line'> 42</span> * @param values Array of message parts which will be concatenated later.
|
|
||||||
<span class='line'> 43</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span> </span><span class="NAME">jasmine.NestedResults.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">values</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="NAME">this.items_.push</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.MessageResult</span><span class="PUNC">(</span><span class="NAME">values</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span>
|
|
||||||
<span class='line'> 48</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 49</span> * Getter for the results: message & results.
|
|
||||||
<span class='line'> 50</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="NAME">jasmine.NestedResults.prototype.getItems</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.items_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span>
|
|
||||||
<span class='line'> 55</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 56</span> * Adds a result, tracking counts (total, passed, & failed)
|
|
||||||
<span class='line'> 57</span> * @param {jasmine.ExpectationResult|jasmine.NestedResults} result
|
|
||||||
<span class='line'> 58</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="NAME">jasmine.NestedResults.prototype.addResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.type</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">'log'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.items_</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="NAME">this.rollupCounts</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">this.totalCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</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="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="NAME">this.passedCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="NAME">this.failedCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">this.items_.push</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span>
|
|
||||||
<span class='line'> 75</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 76</span> * @returns {Boolean} True if <b>everything</b> below passed
|
|
||||||
<span class='line'> 77</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="NAME">jasmine.NestedResults.prototype.passed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.passedCount</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">this.totalCount</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span> </span></pre></body></html>
|
|
|
@ -1,130 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Base class for pretty printing for expectation results.
|
|
||||||
<span class='line'> 3</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="NAME">jasmine.PrettyPrinter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">this.ppNestLevel_</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 class='line'> 6</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span>
|
|
||||||
<span class='line'> 8</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 9</span> * Formats a value in a nice, human-readable string.
|
|
||||||
<span class='line'> 10</span> *
|
|
||||||
<span class='line'> 11</span> * @param value
|
|
||||||
<span class='line'> 12</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.format</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.ppNestLevel_</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">40</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'jasmine.PrettyPrinter: format() nested too deeply!'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span>
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">this.ppNestLevel_</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'null'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'<global>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.Any</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="NAME">value.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">value</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">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">this.emitString</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isSpy</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">"spy on "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">value.identity</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">RegExp</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="NAME">value.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'Function'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">value.nodeType</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'number'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'HTMLNode'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">Date</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'Date('</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">value.__Jasmine_been_here_before__</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="STRN">'<circular reference: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="STRN">'Array'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'Object'</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">
|
|
||||||
<span class='line'> 42</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'object'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="NAME">value.__Jasmine_been_here_before__</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="NAME">this.emitArray</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">this.emitObject</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="KEYW">delete</span><span class="WHIT"> </span><span class="NAME">value.__Jasmine_been_here_before__</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">this.emitScalar</span><span class="PUNC">(</span><span class="NAME">value.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">finally</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="NAME">this.ppNestLevel_</span><span class="PUNC">--</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span>
|
|
||||||
<span class='line'> 58</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.iterateObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">fn</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</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">property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">property</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'__Jasmine_been_here_before__'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">continue</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="NAME">fn</span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">obj.__lookupGetter__</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">obj.__lookupGetter__</span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span>
|
|
||||||
<span class='line'> 65</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.emitArray</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.unimplementedMethod_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.emitObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.unimplementedMethod_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.emitScalar</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.unimplementedMethod_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="NAME">jasmine.PrettyPrinter.prototype.emitString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.unimplementedMethod_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span>
|
|
||||||
<span class='line'> 70</span> </span><span class="NAME">jasmine.StringPrettyPrinter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.PrettyPrinter.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span>
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">this.string</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">jasmine.StringPrettyPrinter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.PrettyPrinter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 76</span>
|
|
||||||
<span class='line'> 77</span> </span><span class="NAME">jasmine.StringPrettyPrinter.prototype.emitScalar</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span>
|
|
||||||
<span class='line'> 81</span> </span><span class="NAME">jasmine.StringPrettyPrinter.prototype.emitString</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">"'"</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">value</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"'"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span>
|
|
||||||
<span class='line'> 85</span> </span><span class="NAME">jasmine.StringPrettyPrinter.prototype.emitArray</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">array</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">'[ '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</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">array.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">', '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="NAME">this.format</span><span class="PUNC">(</span><span class="NAME">array</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 class='line'> 92</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">' ]'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 94</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span>
|
|
||||||
<span class='line'> 96</span> </span><span class="NAME">jasmine.StringPrettyPrinter.prototype.emitObject</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">'{ '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">first</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>100</span>
|
|
||||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">this.iterateObject</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">isGetter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">first</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">first</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">
|
|
||||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">self.append</span><span class="PUNC">(</span><span class="STRN">', '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>107</span>
|
|
||||||
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="NAME">self.append</span><span class="PUNC">(</span><span class="NAME">property</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span> </span><span class="WHIT"> </span><span class="NAME">self.append</span><span class="PUNC">(</span><span class="STRN">' : '</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">isGetter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="NAME">self.append</span><span class="PUNC">(</span><span class="STRN">'<getter>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="NAME">self.format</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span>
|
|
||||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="NAME">this.append</span><span class="PUNC">(</span><span class="STRN">' }'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>119</span>
|
|
||||||
<span class='line'>120</span> </span><span class="NAME">jasmine.StringPrettyPrinter.prototype.append</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">this.string</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>122</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span></pre></body></html>
|
|
|
@ -1,102 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="NAME">jasmine.Queue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 2</span> </span><span class="WHIT"> </span><span class="NAME">this.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 3</span> </span><span class="WHIT"> </span><span class="NAME">this.blocks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="WHIT"> </span><span class="NAME">this.running</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">
|
|
||||||
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">this.index</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 class='line'> 6</span> </span><span class="WHIT"> </span><span class="NAME">this.offset</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 class='line'> 7</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span>
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.Queue.prototype.addBefore</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">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.blocks.unshift</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span>
|
|
||||||
<span class='line'> 13</span> </span><span class="NAME">jasmine.Queue.prototype.add</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">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="NAME">this.blocks.push</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span>
|
|
||||||
<span class='line'> 17</span> </span><span class="NAME">jasmine.Queue.prototype.insertNext</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">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">this.blocks.splice</span><span class="PUNC">(</span><span class="PUNC">(</span><span class="NAME">this.index</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.offset</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</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">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">this.offset</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span>
|
|
||||||
<span class='line'> 22</span> </span><span class="NAME">jasmine.Queue.prototype.start</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="NAME">this.running</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">this.onComplete</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="NAME">this.next_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span>
|
|
||||||
<span class='line'> 28</span> </span><span class="NAME">jasmine.Queue.prototype.isRunning</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.running</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span>
|
|
||||||
<span class='line'> 32</span> </span><span class="NAME">jasmine.Queue.LOOP_DONT_RECURSE</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span>
|
|
||||||
<span class='line'> 34</span> </span><span class="NAME">jasmine.Queue.prototype.next_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">goAgain</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span>
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="KEYW">while</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">goAgain</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="NAME">goAgain</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">
|
|
||||||
<span class='line'> 40</span> </span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.index</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">self.blocks.length</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">calledSynchronously</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">completedSynchronously</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">
|
|
||||||
<span class='line'> 44</span>
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Queue.LOOP_DONT_RECURSE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">calledSynchronously</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">completedSynchronously</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span>
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">self.offset</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 class='line'> 52</span> </span><span class="WHIT"> </span><span class="NAME">self.index</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span>
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">now</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="NAME">getTime</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.env.updateInterval</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">now</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">self.env.lastUpdate</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NAME">self.env.updateInterval</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="NAME">self.env.lastUpdate</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">now</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">self.env.setTimeout</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="NAME">self.next_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="PUNC">}</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">
|
|
||||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Queue.LOOP_DONT_RECURSE</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">completedSynchronously</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="NAME">goAgain</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">self.next_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="NAME">self.blocks</span><span class="PUNC">[</span><span class="NAME">self.index</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">execute</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span>
|
|
||||||
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="NAME">calledSynchronously</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">
|
|
||||||
<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">completedSynchronously</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 76</span> </span><span class="WHIT"> </span><span class="NAME">self.running</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">
|
|
||||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="NAME">self.onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span>
|
|
||||||
<span class='line'> 84</span> </span><span class="NAME">jasmine.Queue.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">
|
|
||||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">results</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.NestedResults</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.blocks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.blocks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">results</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="NAME">results.addResult</span><span class="PUNC">(</span><span class="NAME">this.blocks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">results</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 92</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span>
|
|
||||||
<span class='line'> 94</span>
|
|
||||||
<span class='line'> 95</span> </span></pre></body></html>
|
|
|
@ -1,39 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/** No-op base class for Jasmine reporters.
|
|
||||||
<span class='line'> 2</span> *
|
|
||||||
<span class='line'> 3</span> * @constructor
|
|
||||||
<span class='line'> 4</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span> </span><span class="NAME">jasmine.Reporter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span>
|
|
||||||
<span class='line'> 8</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.Reporter.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">
|
|
||||||
<span class='line'> 10</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span>
|
|
||||||
<span class='line'> 12</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="NAME">jasmine.Reporter.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">
|
|
||||||
<span class='line'> 14</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span>
|
|
||||||
<span class='line'> 16</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="NAME">jasmine.Reporter.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">
|
|
||||||
<span class='line'> 18</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span>
|
|
||||||
<span class='line'> 20</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="NAME">jasmine.Reporter.prototype.reportSpecStarting</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">
|
|
||||||
<span class='line'> 22</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span>
|
|
||||||
<span class='line'> 24</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="NAME">jasmine.Reporter.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">
|
|
||||||
<span class='line'> 26</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span>
|
|
||||||
<span class='line'> 28</span> </span><span class="COMM">//noinspection JSUnusedLocalSymbols</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="NAME">jasmine.Reporter.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">
|
|
||||||
<span class='line'> 30</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span>
|
|
||||||
<span class='line'> 32</span> </span></pre></body></html>
|
|
|
@ -1,84 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Runner
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> * @param {jasmine.Env} env
|
|
||||||
<span class='line'> 6</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="NAME">jasmine.Runner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">self.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">self.queue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Queue</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="NAME">self.before_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="NAME">self.after_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="NAME">self.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">
|
|
||||||
<span class='line'> 14</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span>
|
|
||||||
<span class='line'> 16</span> </span><span class="NAME">jasmine.Runner.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.env.reporter.reportRunnerStarting</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">self.env.reporter.reportRunnerStarting</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">self.queue.start</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="NAME">self.finishCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span>
|
|
||||||
<span class='line'> 26</span> </span><span class="NAME">jasmine.Runner.prototype.beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="NAME">beforeEachFunction.typeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'beforeEach'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="NAME">this.before_.splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span>
|
|
||||||
<span class='line'> 31</span> </span><span class="NAME">jasmine.Runner.prototype.afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="NAME">afterEachFunction.typeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'afterEach'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="NAME">this.after_.splice</span><span class="PUNC">(</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span>
|
|
||||||
<span class='line'> 36</span>
|
|
||||||
<span class='line'> 37</span> </span><span class="NAME">jasmine.Runner.prototype.finishCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportRunnerResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</span>
|
|
||||||
<span class='line'> 41</span> </span><span class="NAME">jasmine.Runner.prototype.addSuite</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">
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="NAME">this.suites_.push</span><span class="PUNC">(</span><span class="NAME">suite</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span>
|
|
||||||
<span class='line'> 45</span> </span><span class="NAME">jasmine.Runner.prototype.add</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">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">block</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Suite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">this.addSuite</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span>
|
|
||||||
<span class='line'> 52</span> </span><span class="NAME">jasmine.Runner.prototype.specs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</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">this.suites</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</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="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</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">
|
|
||||||
<span class='line'> 56</span> </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">specs.concat</span><span class="PUNC">(</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="NAME">specs</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">specs</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span>
|
|
||||||
<span class='line'> 61</span> </span><span class="NAME">jasmine.Runner.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">
|
|
||||||
<span class='line'> 62</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">
|
|
||||||
<span class='line'> 63</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span>
|
|
||||||
<span class='line'> 65</span> </span><span class="NAME">jasmine.Runner.prototype.topLevelSuites</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">topLevelSuites</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.suites_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</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">this.suites_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="NAME">topLevelSuites.push</span><span class="PUNC">(</span><span class="NAME">this.suites_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">topLevelSuites</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span>
|
|
||||||
<span class='line'> 75</span> </span><span class="NAME">jasmine.Runner.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">
|
|
||||||
<span class='line'> 76</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.queue.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 77</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
|
|
|
@ -1,218 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Internal representation of a Jasmine specification, or test.
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> * @param {jasmine.Env} env
|
|
||||||
<span class='line'> 6</span> * @param {jasmine.Suite} suite
|
|
||||||
<span class='line'> 7</span> * @param {String} description
|
|
||||||
<span class='line'> 8</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.Spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</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">env</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'jasmine.Env() required'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</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">suite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'jasmine.Suite() required'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="NAME">spec.id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env.nextSpecId</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">env.nextSpecId</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">spec.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">spec.suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">spec.description</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">spec.queue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Queue</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span>
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="NAME">spec.afterCallbacks</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">spec.spies_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span>
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="NAME">spec.results_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.NestedResults</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="NAME">spec.results_.description</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="NAME">spec.matchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span>
|
|
||||||
<span class='line'> 31</span> </span><span class="NAME">jasmine.Spec.prototype.getFullName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.suite.getFullName</span><span class="PUNC">(</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">this.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'.'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span>
|
|
||||||
<span class='line'> 35</span>
|
|
||||||
<span class='line'> 36</span> </span><span class="NAME">jasmine.Spec.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">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.results_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span>
|
|
||||||
<span class='line'> 40</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 41</span> * All parameters are pretty-printed and concatenated together, then written to the spec's output.
|
|
||||||
<span class='line'> 42</span> *
|
|
||||||
<span class='line'> 43</span> * Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
|
||||||
<span class='line'> 44</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="NAME">jasmine.Spec.prototype.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.results_.log</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span>
|
|
||||||
<span class='line'> 49</span> </span><span class="NAME">jasmine.Spec.prototype.runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">block</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span>
|
|
||||||
<span class='line'> 55</span> </span><span class="NAME">jasmine.Spec.prototype.addToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.insertNext</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="NAME">block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span>
|
|
||||||
<span class='line'> 63</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 64</span> * @param {jasmine.ExpectationResult} result
|
|
||||||
<span class='line'> 65</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="NAME">jasmine.Spec.prototype.addMatcherResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">result</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span>
|
|
||||||
<span class='line'> 70</span> </span><span class="NAME">jasmine.Spec.prototype.expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="NAME">positive.not</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">actual</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">positive</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span>
|
|
||||||
<span class='line'> 76</span> </span><span class="NAME">jasmine.Spec.prototype.waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span>
|
|
||||||
<span class='line'> 82</span> </span><span class="NAME">jasmine.Spec.prototype.waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsForFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsForBlock</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeoutMessage</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">this.addToQueue</span><span class="PUNC">(</span><span class="NAME">waitsForFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span>
|
|
||||||
<span class='line'> 88</span> </span><span class="NAME">jasmine.Spec.prototype.fail</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expectationResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.ExpectationResult</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 90</span> </span><span class="WHIT"> </span><span class="NAME">passed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">jasmine.util.formatException</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'Exception'</span><span class="WHIT">
|
|
||||||
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="NAME">this.results_.addResult</span><span class="PUNC">(</span><span class="NAME">expectationResult</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 94</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span>
|
|
||||||
<span class='line'> 96</span> </span><span class="NAME">jasmine.Spec.prototype.getMatchersClass_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">this.env.matchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 99</span>
|
|
||||||
<span class='line'>100</span> </span><span class="NAME">jasmine.Spec.prototype.addMatchers</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.getMatchersClass_</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>103</span> </span><span class="WHIT"> </span><span class="NAME">parent.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">newMatchersClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parent</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.wrapInto_</span><span class="PUNC">(</span><span class="NAME">matchersPrototype</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>107</span> </span><span class="WHIT"> </span><span class="NAME">this.matchersClass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newMatchersClass</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>108</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span>
|
|
||||||
<span class='line'>110</span> </span><span class="NAME">jasmine.Spec.prototype.finishCallback</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>111</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportSpecResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>112</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>113</span>
|
|
||||||
<span class='line'>114</span> </span><span class="NAME">jasmine.Spec.prototype.finish</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="NAME">this.removeAllSpies</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span> </span><span class="WHIT"> </span><span class="NAME">this.finishCallback</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>120</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>121</span>
|
|
||||||
<span class='line'>122</span> </span><span class="NAME">jasmine.Spec.prototype.after</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.queue.isRunning</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">doAfter</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.unshift</span><span class="PUNC">(</span><span class="NAME">doAfter</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>128</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>129</span>
|
|
||||||
<span class='line'>130</span> </span><span class="NAME">jasmine.Spec.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">spec.env.specFilter</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">spec.results_.skipped</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>137</span>
|
|
||||||
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportSpecStarting</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>139</span>
|
|
||||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="NAME">spec.env.currentSpec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>141</span>
|
|
||||||
<span class='line'>142</span> </span><span class="WHIT"> </span><span class="NAME">spec.addBeforesAndAftersToQueue</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>143</span>
|
|
||||||
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="NAME">spec.queue.start</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="NAME">spec.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>147</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>148</span>
|
|
||||||
<span class='line'>149</span> </span><span class="NAME">jasmine.Spec.prototype.addBeforesAndAftersToQueue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.env.currentRunner</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>152</span>
|
|
||||||
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.before_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>159</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.addBefore</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.before_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.afterCallbacks</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">suite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">suite.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>166</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">suite.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>168</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>169</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">runner.after_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">(</span><span class="NAME">this.env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.after_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>172</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>173</span>
|
|
||||||
<span class='line'>174</span> </span><span class="NAME">jasmine.Spec.prototype.explodes</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>175</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">'explodes function should not have been called'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>176</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>177</span>
|
|
||||||
<span class='line'>178</span> </span><span class="NAME">jasmine.Spec.prototype.spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">ignoreMethodDoesntExist</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="STRN">"spyOn could not find an object to spy upon for "</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">"()"</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>182</span>
|
|
||||||
<span class='line'>183</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>184</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'() method does not exist'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>185</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>186</span>
|
|
||||||
<span class='line'>187</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">ignoreMethodDoesntExist</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">isSpy</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>188</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' has already been spied upon'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>189</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>190</span>
|
|
||||||
<span class='line'>191</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.createSpy</span><span class="PUNC">(</span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>192</span>
|
|
||||||
<span class='line'>193</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_.push</span><span class="PUNC">(</span><span class="NAME">spyObj</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>194</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.baseObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>195</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.methodName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>196</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.originalValue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>197</span>
|
|
||||||
<span class='line'>198</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>199</span>
|
|
||||||
<span class='line'>200</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>201</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>202</span>
|
|
||||||
<span class='line'>203</span> </span><span class="NAME">jasmine.Spec.prototype.removeAllSpies</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>204</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.spies_.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>205</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>206</span> </span><span class="WHIT"> </span><span class="NAME">spy.baseObj</span><span class="PUNC">[</span><span class="NAME">spy.methodName</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spy.originalValue</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>207</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>208</span> </span><span class="WHIT"> </span><span class="NAME">this.spies_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>209</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>210</span>
|
|
||||||
<span class='line'>211</span> </span></pre></body></html>
|
|
|
@ -1,89 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Internal representation of a Jasmine suite.
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @constructor
|
|
||||||
<span class='line'> 5</span> * @param {jasmine.Env} env
|
|
||||||
<span class='line'> 6</span> * @param {String} description
|
|
||||||
<span class='line'> 7</span> * @param {Function} specDefinitions
|
|
||||||
<span class='line'> 8</span> * @param {jasmine.Suite} parentSuite
|
|
||||||
<span class='line'> 9</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="NAME">jasmine.Suite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="NAME">self.id</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env.nextSuiteId</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">env.nextSuiteId</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="NAME">self.description</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">description</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="NAME">self.queue</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Queue</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="NAME">self.parentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="NAME">self.env</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="NAME">self.before_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">self.after_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">self.children_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">self.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">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">self.specs_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span>
|
|
||||||
<span class='line'> 24</span> </span><span class="NAME">jasmine.Suite.prototype.getFullName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fullName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.description</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</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">parentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.parentSuite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">parentSuite</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentSuite.parentSuite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="NAME">fullName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentSuite.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fullName</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">fullName</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span>
|
|
||||||
<span class='line'> 32</span> </span><span class="NAME">jasmine.Suite.prototype.finish</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.reportSuiteResults</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</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">
|
|
||||||
<span class='line'> 35</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="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span>
|
|
||||||
<span class='line'> 40</span> </span><span class="NAME">jasmine.Suite.prototype.beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="NAME">beforeEachFunction.typeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'beforeEach'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="NAME">this.before_.unshift</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span>
|
|
||||||
<span class='line'> 45</span> </span><span class="NAME">jasmine.Suite.prototype.afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="NAME">afterEachFunction.typeName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'afterEach'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">this.after_.unshift</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span>
|
|
||||||
<span class='line'> 50</span> </span><span class="NAME">jasmine.Suite.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">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.queue.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span>
|
|
||||||
<span class='line'> 54</span> </span><span class="NAME">jasmine.Suite.prototype.add</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">
|
|
||||||
<span class='line'> 55</span> </span><span class="WHIT"> </span><span class="NAME">this.children_.push</span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="WHIT"> </span><span class="KEYW">instanceof</span><span class="WHIT"> </span><span class="NAME">jasmine.Suite</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">this.suites_.push</span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="NAME">this.env.currentRunner</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addSuite</span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span> </span><span class="WHIT"> </span><span class="NAME">this.specs_.push</span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.add</span><span class="PUNC">(</span><span class="NAME">suiteOrSpec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span>
|
|
||||||
<span class='line'> 65</span> </span><span class="NAME">jasmine.Suite.prototype.specs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.specs_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span>
|
|
||||||
<span class='line'> 69</span> </span><span class="NAME">jasmine.Suite.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">
|
|
||||||
<span class='line'> 70</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">
|
|
||||||
<span class='line'> 71</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span>
|
|
||||||
<span class='line'> 73</span> </span><span class="NAME">jasmine.Suite.prototype.children</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.children_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 76</span>
|
|
||||||
<span class='line'> 77</span> </span><span class="NAME">jasmine.Suite.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="NAME">this.queue.start</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="NAME">self.finish</span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
|
|
|
@ -1,21 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="NAME">jasmine.WaitsBlock</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 2</span> </span><span class="WHIT"> </span><span class="NAME">this.timeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 3</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Block.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span>
|
|
||||||
<span class='line'> 6</span> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">jasmine.WaitsBlock</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span>
|
|
||||||
<span class='line'> 8</span> </span><span class="NAME">jasmine.WaitsBlock.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">this.env.reporter.log</span><span class="PUNC">(</span><span class="STRN">'>> Jasmine waiting for '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">this.timeout</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' ms...'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">this.env.setTimeout</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this.timeout</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span></pre></body></html>
|
|
|
@ -1,44 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="NAME">jasmine.WaitsForBlock</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 2</span> </span><span class="WHIT"> </span><span class="NAME">this.timeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">timeout</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 3</span> </span><span class="WHIT"> </span><span class="NAME">this.latchFunction</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="WHIT"> </span><span class="NAME">this.message</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">
|
|
||||||
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">this.totalTimeSpentWaitingForLatch</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 class='line'> 6</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Block.call</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">env</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span>
|
|
||||||
<span class='line'> 9</span> </span><span class="NAME">jasmine.util.inherit</span><span class="PUNC">(</span><span class="NAME">jasmine.WaitsForBlock</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">jasmine.Block</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span>
|
|
||||||
<span class='line'> 11</span> </span><span class="NAME">jasmine.WaitsForBlock.TIMEOUT_INCREMENT</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">100</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span>
|
|
||||||
<span class='line'> 13</span> </span><span class="NAME">jasmine.WaitsForBlock.prototype.execute</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">onComplete</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="NAME">self.env.reporter.log</span><span class="PUNC">(</span><span class="STRN">'>> Jasmine waiting for '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'something to happen'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">latchFunctionResult</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">latchFunctionResult</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.latchFunction.apply</span><span class="PUNC">(</span><span class="NAME">self.spec</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">self.spec.fail</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span>
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">latchFunctionResult</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="NAME">onComplete</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.totalTimeSpentWaitingForLatch</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">self.timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</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">'timed out after '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">self.timeout</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' msec waiting for '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">self.message</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'something to happen'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">self.spec.fail</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<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="STRN">'timeout'</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">message</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="NAME">self.totalTimeSpentWaitingForLatch</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.WaitsForBlock.TIMEOUT_INCREMENT</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="NAME">self.env.setTimeout</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">self.execute</span><span class="PUNC">(</span><span class="NAME">onComplete</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">jasmine.WaitsForBlock.TIMEOUT_INCREMENT</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
|
|
|
@ -1,590 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
|
|
||||||
<span class='line'> 3</span> *
|
|
||||||
<span class='line'> 4</span> * @namespace
|
|
||||||
<span class='line'> 5</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">jasmine</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 7</span>
|
|
||||||
<span class='line'> 8</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 9</span> * @private
|
|
||||||
<span class='line'> 10</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="NAME">jasmine.unimplementedMethod_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"unimplemented method"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span>
|
|
||||||
<span class='line'> 15</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 16</span> * Use <code>jasmine.undefined</code> instead of <code>undefined</code>, since <code>undefined</code> is just
|
|
||||||
<span class='line'> 17</span> * a plain old variable and may be redefined by somebody else.
|
|
||||||
<span class='line'> 18</span> *
|
|
||||||
<span class='line'> 19</span> * @private
|
|
||||||
<span class='line'> 20</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.___undefined___</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span>
|
|
||||||
<span class='line'> 23</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 24</span> * Default interval for event loop yields. Small values here may result in slow test running. Zero means no updates until all tests have completed.
|
|
||||||
<span class='line'> 25</span> *
|
|
||||||
<span class='line'> 26</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="NAME">jasmine.DEFAULT_UPDATE_INTERVAL</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">250</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span>
|
|
||||||
<span class='line'> 29</span> </span><span class="NAME">jasmine.getGlobal</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span>
|
|
||||||
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span>
|
|
||||||
<span class='line'> 37</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 38</span> * Allows for bound functions to be compared. Internal use only.
|
|
||||||
<span class='line'> 39</span> *
|
|
||||||
<span class='line'> 40</span> * @ignore
|
|
||||||
<span class='line'> 41</span> * @private
|
|
||||||
<span class='line'> 42</span> * @param base {Object} bound 'this' for the function
|
|
||||||
<span class='line'> 43</span> * @param name {Function} function to find
|
|
||||||
<span class='line'> 44</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="NAME">jasmine.bindOriginal_</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">base</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">original</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">base</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">original.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">original.apply</span><span class="PUNC">(</span><span class="NAME">base</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="COMM">// IE support</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NAME">name</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span>
|
|
||||||
<span class='line'> 57</span> </span><span class="NAME">jasmine.setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.bindOriginal_</span><span class="PUNC">(</span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'setTimeout'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="NAME">jasmine.clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.bindOriginal_</span><span class="PUNC">(</span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'clearTimeout'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="NAME">jasmine.setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.bindOriginal_</span><span class="PUNC">(</span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'setInterval'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</span> </span><span class="NAME">jasmine.clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.bindOriginal_</span><span class="PUNC">(</span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'clearInterval'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span>
|
|
||||||
<span class='line'> 62</span> </span><span class="NAME">jasmine.MessageResult</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">values</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'log'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">this.values</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">values</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="NAME">this.trace</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">Error</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// todo: test better</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span>
|
|
||||||
<span class='line'> 68</span> </span><span class="NAME">jasmine.MessageResult.prototype.toString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 70</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="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">this.values.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">" "</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.isString_</span><span class="PUNC">(</span><span class="NAME">this.values</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">
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.values</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="NAME">text</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.pp</span><span class="PUNC">(</span><span class="NAME">this.values</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 class='line'> 76</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">text</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span>
|
|
||||||
<span class='line'> 81</span> </span><span class="NAME">jasmine.ExpectationResult</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">params</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="NAME">this.type</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'expect'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="NAME">this.matcherName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.matcherName</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">this.passed_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.passed</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="NAME">this.expected</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.expected</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="NAME">this.actual</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">params.actual</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span>
|
|
||||||
<span class='line'> 88</span> </span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.passed_</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="NAME">params.message</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span> </span><span class="WHIT"> </span><span class="NAME">this.trace</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.passed_</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="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="NAME">this.message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 90</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span>
|
|
||||||
<span class='line'> 92</span> </span><span class="NAME">jasmine.ExpectationResult.prototype.toString</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.message</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 94</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span>
|
|
||||||
<span class='line'> 96</span> </span><span class="NAME">jasmine.ExpectationResult.prototype.passed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">this.passed_</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 99</span>
|
|
||||||
<span class='line'>100</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>101</span> * Getter for the Jasmine environment. Ensures one gets created
|
|
||||||
<span class='line'>102</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>103</span> </span><span class="NAME">jasmine.getEnv</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.currentEnv_</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.currentEnv_</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Env</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>105</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>106</span>
|
|
||||||
<span class='line'>107</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>108</span> * @ignore
|
|
||||||
<span class='line'>109</span> * @private
|
|
||||||
<span class='line'>110</span> * @param value
|
|
||||||
<span class='line'>111</span> * @returns {Boolean}
|
|
||||||
<span class='line'>112</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>113</span> </span><span class="NAME">jasmine.isArray_</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.isA_</span><span class="PUNC">(</span><span class="STRN">"Array"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>115</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span>
|
|
||||||
<span class='line'>117</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>118</span> * @ignore
|
|
||||||
<span class='line'>119</span> * @private
|
|
||||||
<span class='line'>120</span> * @param value
|
|
||||||
<span class='line'>121</span> * @returns {Boolean}
|
|
||||||
<span class='line'>122</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span><span class="NAME">jasmine.isString_</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.isA_</span><span class="PUNC">(</span><span class="STRN">"String"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>125</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>126</span>
|
|
||||||
<span class='line'>127</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>128</span> * @ignore
|
|
||||||
<span class='line'>129</span> * @private
|
|
||||||
<span class='line'>130</span> * @param value
|
|
||||||
<span class='line'>131</span> * @returns {Boolean}
|
|
||||||
<span class='line'>132</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>133</span> </span><span class="NAME">jasmine.isNumber_</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.isA_</span><span class="PUNC">(</span><span class="STRN">"Number"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>135</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>136</span>
|
|
||||||
<span class='line'>137</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>138</span> * @ignore
|
|
||||||
<span class='line'>139</span> * @private
|
|
||||||
<span class='line'>140</span> * @param {String} typeName
|
|
||||||
<span class='line'>141</span> * @param value
|
|
||||||
<span class='line'>142</span> * @returns {Boolean}
|
|
||||||
<span class='line'>143</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>144</span> </span><span class="NAME">jasmine.isA_</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">typeName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Object.prototype.toString.apply</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="STRN">'[object '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">typeName</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">']'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>147</span>
|
|
||||||
<span class='line'>148</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>149</span> * Pretty printer for expecations. Takes any object and turns it into a human-readable string.
|
|
||||||
<span class='line'>150</span> *
|
|
||||||
<span class='line'>151</span> * @param value {Object} an object to be outputted
|
|
||||||
<span class='line'>152</span> * @returns {String}
|
|
||||||
<span class='line'>153</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>154</span> </span><span class="NAME">jasmine.pp</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">stringPrettyPrinter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.StringPrettyPrinter</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="NAME">stringPrettyPrinter.format</span><span class="PUNC">(</span><span class="NAME">value</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">stringPrettyPrinter.string</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>158</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>159</span>
|
|
||||||
<span class='line'>160</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>161</span> * Returns true if the object is a DOM Node.
|
|
||||||
<span class='line'>162</span> *
|
|
||||||
<span class='line'>163</span> * @param {Object} obj object to check
|
|
||||||
<span class='line'>164</span> * @returns {Boolean}
|
|
||||||
<span class='line'>165</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>166</span> </span><span class="NAME">jasmine.isDomNode</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="STRN">'nodeType'</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">
|
|
||||||
<span class='line'>168</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>169</span>
|
|
||||||
<span class='line'>170</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>171</span> * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter.
|
|
||||||
<span class='line'>172</span> *
|
|
||||||
<span class='line'>173</span> * @example
|
|
||||||
<span class='line'>174</span> * // don't care about which function is passed in, as long as it's a function
|
|
||||||
<span class='line'>175</span> * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function));
|
|
||||||
<span class='line'>176</span> *
|
|
||||||
<span class='line'>177</span> * @param {Class} clazz
|
|
||||||
<span class='line'>178</span> * @returns matchable object of the type clazz
|
|
||||||
<span class='line'>179</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>180</span> </span><span class="NAME">jasmine.any</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">clazz</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Matchers.Any</span><span class="PUNC">(</span><span class="NAME">clazz</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>182</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>183</span>
|
|
||||||
<span class='line'>184</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>185</span> * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks.
|
|
||||||
<span class='line'>186</span> *
|
|
||||||
<span class='line'>187</span> * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine
|
|
||||||
<span class='line'>188</span> * expectation syntax. Spies can be checked if they were called or not and what the calling params were.
|
|
||||||
<span class='line'>189</span> *
|
|
||||||
<span class='line'>190</span> * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs).
|
|
||||||
<span class='line'>191</span> *
|
|
||||||
<span class='line'>192</span> * Spies are torn down at the end of every spec.
|
|
||||||
<span class='line'>193</span> *
|
|
||||||
<span class='line'>194</span> * Note: Do <b>not</b> call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj.
|
|
||||||
<span class='line'>195</span> *
|
|
||||||
<span class='line'>196</span> * @example
|
|
||||||
<span class='line'>197</span> * // a stub
|
|
||||||
<span class='line'>198</span> * var myStub = jasmine.createSpy('myStub'); // can be used anywhere
|
|
||||||
<span class='line'>199</span> *
|
|
||||||
<span class='line'>200</span> * // spy example
|
|
||||||
<span class='line'>201</span> * var foo = {
|
|
||||||
<span class='line'>202</span> * not: function(bool) { return !bool; }
|
|
||||||
<span class='line'>203</span> * }
|
|
||||||
<span class='line'>204</span> *
|
|
||||||
<span class='line'>205</span> * // actual foo.not will not be called, execution stops
|
|
||||||
<span class='line'>206</span> * spyOn(foo, 'not');
|
|
||||||
<span class='line'>207</span>
|
|
||||||
<span class='line'>208</span> // foo.not spied upon, execution will continue to implementation
|
|
||||||
<span class='line'>209</span> * spyOn(foo, 'not').andCallThrough();
|
|
||||||
<span class='line'>210</span> *
|
|
||||||
<span class='line'>211</span> * // fake example
|
|
||||||
<span class='line'>212</span> * var foo = {
|
|
||||||
<span class='line'>213</span> * not: function(bool) { return !bool; }
|
|
||||||
<span class='line'>214</span> * }
|
|
||||||
<span class='line'>215</span> *
|
|
||||||
<span class='line'>216</span> * // foo.not(val) will return val
|
|
||||||
<span class='line'>217</span> * spyOn(foo, 'not').andCallFake(function(value) {return value;});
|
|
||||||
<span class='line'>218</span> *
|
|
||||||
<span class='line'>219</span> * // mock example
|
|
||||||
<span class='line'>220</span> * foo.not(7 == 7);
|
|
||||||
<span class='line'>221</span> * expect(foo.not).toHaveBeenCalled();
|
|
||||||
<span class='line'>222</span> * expect(foo.not).toHaveBeenCalledWith(true);
|
|
||||||
<span class='line'>223</span> *
|
|
||||||
<span class='line'>224</span> * @constructor
|
|
||||||
<span class='line'>225</span> * @see spyOn, jasmine.createSpy, jasmine.createSpyObj
|
|
||||||
<span class='line'>226</span> * @param {String} name
|
|
||||||
<span class='line'>227</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>228</span> </span><span class="NAME">jasmine.Spy</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">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>229</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'>230</span> * The name of the spy, if provided.
|
|
||||||
<span class='line'>231</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>232</span> </span><span class="WHIT"> </span><span class="NAME">this.identity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">name</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="STRN">'unknown'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>233</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'>234</span> * Is this Object a spy?
|
|
||||||
<span class='line'>235</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>236</span> </span><span class="WHIT"> </span><span class="NAME">this.isSpy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>237</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'>238</span> * The actual function this spy stubs.
|
|
||||||
<span class='line'>239</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>240</span> </span><span class="WHIT"> </span><span class="NAME">this.plan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>241</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>242</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'>243</span> * Tracking of the most recent call to the spy.
|
|
||||||
<span class='line'>244</span> * @example
|
|
||||||
<span class='line'>245</span> * var mySpy = jasmine.createSpy('foo');
|
|
||||||
<span class='line'>246</span> * mySpy(1, 2);
|
|
||||||
<span class='line'>247</span> * mySpy.mostRecentCall.args = [1, 2];
|
|
||||||
<span class='line'>248</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>249</span> </span><span class="WHIT"> </span><span class="NAME">this.mostRecentCall</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>250</span>
|
|
||||||
<span class='line'>251</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'>252</span> * Holds arguments for each call to the spy, indexed by call count
|
|
||||||
<span class='line'>253</span> * @example
|
|
||||||
<span class='line'>254</span> * var mySpy = jasmine.createSpy('foo');
|
|
||||||
<span class='line'>255</span> * mySpy(1, 2);
|
|
||||||
<span class='line'>256</span> * mySpy(7, 8);
|
|
||||||
<span class='line'>257</span> * mySpy.mostRecentCall.args = [7, 8];
|
|
||||||
<span class='line'>258</span> * mySpy.argsForCall[0] = [1, 2];
|
|
||||||
<span class='line'>259</span> * mySpy.argsForCall[1] = [7, 8];
|
|
||||||
<span class='line'>260</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>261</span> </span><span class="WHIT"> </span><span class="NAME">this.argsForCall</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>262</span> </span><span class="WHIT"> </span><span class="NAME">this.calls</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>263</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>264</span>
|
|
||||||
<span class='line'>265</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>266</span> * Tells a spy to call through to the actual implemenatation.
|
|
||||||
<span class='line'>267</span> *
|
|
||||||
<span class='line'>268</span> * @example
|
|
||||||
<span class='line'>269</span> * var foo = {
|
|
||||||
<span class='line'>270</span> * bar: function() { // do some stuff }
|
|
||||||
<span class='line'>271</span> * }
|
|
||||||
<span class='line'>272</span> *
|
|
||||||
<span class='line'>273</span> * // defining a spy on an existing property: foo.bar
|
|
||||||
<span class='line'>274</span> * spyOn(foo, 'bar').andCallThrough();
|
|
||||||
<span class='line'>275</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>276</span> </span><span class="NAME">jasmine.Spy.prototype.andCallThrough</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>277</span> </span><span class="WHIT"> </span><span class="NAME">this.plan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.originalValue</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>278</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>279</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>280</span>
|
|
||||||
<span class='line'>281</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>282</span> * For setting the return value of a spy.
|
|
||||||
<span class='line'>283</span> *
|
|
||||||
<span class='line'>284</span> * @example
|
|
||||||
<span class='line'>285</span> * // defining a spy from scratch: foo() returns 'baz'
|
|
||||||
<span class='line'>286</span> * var foo = jasmine.createSpy('spy on foo').andReturn('baz');
|
|
||||||
<span class='line'>287</span> *
|
|
||||||
<span class='line'>288</span> * // defining a spy on an existing property: foo.bar() returns 'baz'
|
|
||||||
<span class='line'>289</span> * spyOn(foo, 'bar').andReturn('baz');
|
|
||||||
<span class='line'>290</span> *
|
|
||||||
<span class='line'>291</span> * @param {Object} value
|
|
||||||
<span class='line'>292</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>293</span> </span><span class="NAME">jasmine.Spy.prototype.andReturn</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">value</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>294</span> </span><span class="WHIT"> </span><span class="NAME">this.plan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>295</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">value</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>296</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>297</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>298</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>299</span>
|
|
||||||
<span class='line'>300</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>301</span> * For throwing an exception when a spy is called.
|
|
||||||
<span class='line'>302</span> *
|
|
||||||
<span class='line'>303</span> * @example
|
|
||||||
<span class='line'>304</span> * // defining a spy from scratch: foo() throws an exception w/ message 'ouch'
|
|
||||||
<span class='line'>305</span> * var foo = jasmine.createSpy('spy on foo').andThrow('baz');
|
|
||||||
<span class='line'>306</span> *
|
|
||||||
<span class='line'>307</span> * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch'
|
|
||||||
<span class='line'>308</span> * spyOn(foo, 'bar').andThrow('baz');
|
|
||||||
<span class='line'>309</span> *
|
|
||||||
<span class='line'>310</span> * @param {String} exceptionMsg
|
|
||||||
<span class='line'>311</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>312</span> </span><span class="NAME">jasmine.Spy.prototype.andThrow</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">exceptionMsg</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>313</span> </span><span class="WHIT"> </span><span class="NAME">this.plan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>314</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="NAME">exceptionMsg</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>315</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>316</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>317</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>318</span>
|
|
||||||
<span class='line'>319</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>320</span> * Calls an alternate implementation when a spy is called.
|
|
||||||
<span class='line'>321</span> *
|
|
||||||
<span class='line'>322</span> * @example
|
|
||||||
<span class='line'>323</span> * var baz = function() {
|
|
||||||
<span class='line'>324</span> * // do some stuff, return something
|
|
||||||
<span class='line'>325</span> * }
|
|
||||||
<span class='line'>326</span> * // defining a spy from scratch: foo() calls the function baz
|
|
||||||
<span class='line'>327</span> * var foo = jasmine.createSpy('spy on foo').andCall(baz);
|
|
||||||
<span class='line'>328</span> *
|
|
||||||
<span class='line'>329</span> * // defining a spy on an existing property: foo.bar() calls an anonymnous function
|
|
||||||
<span class='line'>330</span> * spyOn(foo, 'bar').andCall(function() { return 'baz';} );
|
|
||||||
<span class='line'>331</span> *
|
|
||||||
<span class='line'>332</span> * @param {Function} fakeFunc
|
|
||||||
<span class='line'>333</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>334</span> </span><span class="NAME">jasmine.Spy.prototype.andCallFake</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">fakeFunc</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>335</span> </span><span class="WHIT"> </span><span class="NAME">this.plan</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fakeFunc</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>336</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>337</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>338</span>
|
|
||||||
<span class='line'>339</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>340</span> * Resets all of a spy's the tracking variables so that it can be used again.
|
|
||||||
<span class='line'>341</span> *
|
|
||||||
<span class='line'>342</span> * @example
|
|
||||||
<span class='line'>343</span> * spyOn(foo, 'bar');
|
|
||||||
<span class='line'>344</span> *
|
|
||||||
<span class='line'>345</span> * foo.bar();
|
|
||||||
<span class='line'>346</span> *
|
|
||||||
<span class='line'>347</span> * expect(foo.bar.callCount).toEqual(1);
|
|
||||||
<span class='line'>348</span> *
|
|
||||||
<span class='line'>349</span> * foo.bar.reset();
|
|
||||||
<span class='line'>350</span> *
|
|
||||||
<span class='line'>351</span> * expect(foo.bar.callCount).toEqual(0);
|
|
||||||
<span class='line'>352</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>353</span> </span><span class="NAME">jasmine.Spy.prototype.reset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>354</span> </span><span class="WHIT"> </span><span class="NAME">this.wasCalled</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">
|
|
||||||
<span class='line'>355</span> </span><span class="WHIT"> </span><span class="NAME">this.callCount</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 class='line'>356</span> </span><span class="WHIT"> </span><span class="NAME">this.argsForCall</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>357</span> </span><span class="WHIT"> </span><span class="NAME">this.calls</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>358</span> </span><span class="WHIT"> </span><span class="NAME">this.mostRecentCall</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>359</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>360</span>
|
|
||||||
<span class='line'>361</span> </span><span class="NAME">jasmine.createSpy</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">name</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>362</span>
|
|
||||||
<span class='line'>363</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>364</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.wasCalled</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>365</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.callCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>366</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.util.argsToArray</span><span class="PUNC">(</span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>367</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.mostRecentCall.object</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>368</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.mostRecentCall.args</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">args</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>369</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.argsForCall.push</span><span class="PUNC">(</span><span class="NAME">args</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>370</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.calls.push</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="NAME">object</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">args</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">args</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>371</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spyObj.plan.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>372</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>373</span>
|
|
||||||
<span class='line'>374</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.Spy</span><span class="PUNC">(</span><span class="NAME">name</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>375</span>
|
|
||||||
<span class='line'>376</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">prop</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>377</span> </span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">[</span><span class="NAME">prop</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">spy</span><span class="PUNC">[</span><span class="NAME">prop</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>378</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>379</span>
|
|
||||||
<span class='line'>380</span> </span><span class="WHIT"> </span><span class="NAME">spyObj.reset</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>381</span>
|
|
||||||
<span class='line'>382</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spyObj</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>383</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>384</span>
|
|
||||||
<span class='line'>385</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>386</span> * Determines whether an object is a spy.
|
|
||||||
<span class='line'>387</span> *
|
|
||||||
<span class='line'>388</span> * @param {jasmine.Spy|Object} putativeSpy
|
|
||||||
<span class='line'>389</span> * @returns {Boolean}
|
|
||||||
<span class='line'>390</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>391</span> </span><span class="NAME">jasmine.isSpy</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">putativeSpy</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>392</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">putativeSpy</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">putativeSpy.isSpy</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>393</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>394</span>
|
|
||||||
<span class='line'>395</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>396</span> * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something
|
|
||||||
<span class='line'>397</span> * large in one call.
|
|
||||||
<span class='line'>398</span> *
|
|
||||||
<span class='line'>399</span> * @param {String} baseName name of spy class
|
|
||||||
<span class='line'>400</span> * @param {Array} methodNames array of names of methods to make spies
|
|
||||||
<span class='line'>401</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>402</span> </span><span class="NAME">jasmine.createSpyObj</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">baseName</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodNames</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>403</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.isArray_</span><span class="PUNC">(</span><span class="NAME">methodNames</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">methodNames.length</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 class='line'>404</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">'createSpyObj requires a non-empty array of method names to create spies for'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>405</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>406</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>407</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">methodNames.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>408</span> </span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">[</span><span class="NAME">methodNames</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.createSpy</span><span class="PUNC">(</span><span class="NAME">baseName</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">methodNames</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 class='line'>409</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>410</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">obj</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>411</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>412</span>
|
|
||||||
<span class='line'>413</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>414</span> * All parameters are pretty-printed and concatenated together, then written to the current spec's output.
|
|
||||||
<span class='line'>415</span> *
|
|
||||||
<span class='line'>416</span> * Be careful not to leave calls to <code>jasmine.log</code> in production code.
|
|
||||||
<span class='line'>417</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>418</span> </span><span class="NAME">jasmine.log</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>419</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>420</span> </span><span class="WHIT"> </span><span class="NAME">spec.log.apply</span><span class="PUNC">(</span><span class="NAME">spec</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>421</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>422</span>
|
|
||||||
<span class='line'>423</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>424</span> * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy.
|
|
||||||
<span class='line'>425</span> *
|
|
||||||
<span class='line'>426</span> * @example
|
|
||||||
<span class='line'>427</span> * // spy example
|
|
||||||
<span class='line'>428</span> * var foo = {
|
|
||||||
<span class='line'>429</span> * not: function(bool) { return !bool; }
|
|
||||||
<span class='line'>430</span> * }
|
|
||||||
<span class='line'>431</span> * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops
|
|
||||||
<span class='line'>432</span> *
|
|
||||||
<span class='line'>433</span> * @see jasmine.createSpy
|
|
||||||
<span class='line'>434</span> * @param obj
|
|
||||||
<span class='line'>435</span> * @param methodName
|
|
||||||
<span class='line'>436</span> * @returns a Jasmine spy that can be chained with all spy methods
|
|
||||||
<span class='line'>437</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>438</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spyOn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>439</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.spyOn</span><span class="PUNC">(</span><span class="NAME">obj</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">methodName</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>440</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>441</span>
|
|
||||||
<span class='line'>442</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>443</span> * Creates a Jasmine spec that will be added to the current suite.
|
|
||||||
<span class='line'>444</span> *
|
|
||||||
<span class='line'>445</span> * // TODO: pending tests
|
|
||||||
<span class='line'>446</span> *
|
|
||||||
<span class='line'>447</span> * @example
|
|
||||||
<span class='line'>448</span> * it('should be true', function() {
|
|
||||||
<span class='line'>449</span> * expect(true).toEqual(true);
|
|
||||||
<span class='line'>450</span> * });
|
|
||||||
<span class='line'>451</span> *
|
|
||||||
<span class='line'>452</span> * @param {String} desc description of this specification
|
|
||||||
<span class='line'>453</span> * @param {Function} func defines the preconditions and expectations of the spec
|
|
||||||
<span class='line'>454</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>455</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">it</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>456</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">it</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>457</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>458</span>
|
|
||||||
<span class='line'>459</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>460</span> * Creates a <em>disabled</em> Jasmine spec.
|
|
||||||
<span class='line'>461</span> *
|
|
||||||
<span class='line'>462</span> * A convenience method that allows existing specs to be disabled temporarily during development.
|
|
||||||
<span class='line'>463</span> *
|
|
||||||
<span class='line'>464</span> * @param {String} desc description of this specification
|
|
||||||
<span class='line'>465</span> * @param {Function} func defines the preconditions and expectations of the spec
|
|
||||||
<span class='line'>466</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>467</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xit</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>468</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xit</span><span class="PUNC">(</span><span class="NAME">desc</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>469</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>470</span>
|
|
||||||
<span class='line'>471</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>472</span> * Starts a chain for a Jasmine expectation.
|
|
||||||
<span class='line'>473</span> *
|
|
||||||
<span class='line'>474</span> * It is passed an Object that is the actual value and should chain to one of the many
|
|
||||||
<span class='line'>475</span> * jasmine.Matchers functions.
|
|
||||||
<span class='line'>476</span> *
|
|
||||||
<span class='line'>477</span> * @param {Object} actual Actual value to test against and expected value
|
|
||||||
<span class='line'>478</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>479</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">expect</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>480</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.expect</span><span class="PUNC">(</span><span class="NAME">actual</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>481</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>482</span>
|
|
||||||
<span class='line'>483</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>484</span> * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs.
|
|
||||||
<span class='line'>485</span> *
|
|
||||||
<span class='line'>486</span> * @param {Function} func Function that defines part of a jasmine spec.
|
|
||||||
<span class='line'>487</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>488</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">runs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>489</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.runs</span><span class="PUNC">(</span><span class="NAME">func</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>490</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>491</span>
|
|
||||||
<span class='line'>492</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>493</span> * Waits for a timeout before moving to the next runs()-defined block.
|
|
||||||
<span class='line'>494</span> * @param {Number} timeout
|
|
||||||
<span class='line'>495</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>496</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waits</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>497</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waits</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>498</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>499</span>
|
|
||||||
<span class='line'>500</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>501</span> * Waits for the latchFunction to return true before proceeding to the next runs()-defined block.
|
|
||||||
<span class='line'>502</span> *
|
|
||||||
<span class='line'>503</span> * @param {Number} timeout
|
|
||||||
<span class='line'>504</span> * @param {Function} latchFunction
|
|
||||||
<span class='line'>505</span> * @param {String} message
|
|
||||||
<span class='line'>506</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>507</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">waitsFor</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>508</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec.waitsFor</span><span class="PUNC">(</span><span class="NAME">timeout</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">latchFunction</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>509</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>510</span>
|
|
||||||
<span class='line'>511</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>512</span> * A function that is called before each spec in a suite.
|
|
||||||
<span class='line'>513</span> *
|
|
||||||
<span class='line'>514</span> * Used for spec setup, including validating assumptions.
|
|
||||||
<span class='line'>515</span> *
|
|
||||||
<span class='line'>516</span> * @param {Function} beforeEachFunction
|
|
||||||
<span class='line'>517</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>518</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">beforeEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>519</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">beforeEach</span><span class="PUNC">(</span><span class="NAME">beforeEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>520</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>521</span>
|
|
||||||
<span class='line'>522</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>523</span> * A function that is called after each spec in a suite.
|
|
||||||
<span class='line'>524</span> *
|
|
||||||
<span class='line'>525</span> * Used for restoring any state that is hijacked during spec execution.
|
|
||||||
<span class='line'>526</span> *
|
|
||||||
<span class='line'>527</span> * @param {Function} afterEachFunction
|
|
||||||
<span class='line'>528</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>529</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">afterEach</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>530</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">afterEach</span><span class="PUNC">(</span><span class="NAME">afterEachFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>531</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>532</span>
|
|
||||||
<span class='line'>533</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>534</span> * Defines a suite of specifications.
|
|
||||||
<span class='line'>535</span> *
|
|
||||||
<span class='line'>536</span> * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared
|
|
||||||
<span class='line'>537</span> * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization
|
|
||||||
<span class='line'>538</span> * of setup in some tests.
|
|
||||||
<span class='line'>539</span> *
|
|
||||||
<span class='line'>540</span> * @example
|
|
||||||
<span class='line'>541</span> * // TODO: a simple suite
|
|
||||||
<span class='line'>542</span> *
|
|
||||||
<span class='line'>543</span> * // TODO: a simple suite with a nested describe block
|
|
||||||
<span class='line'>544</span> *
|
|
||||||
<span class='line'>545</span> * @param {String} description A string, usually the class under test.
|
|
||||||
<span class='line'>546</span> * @param {Function} specDefinitions function that defines several specs.
|
|
||||||
<span class='line'>547</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>548</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">describe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>549</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">describe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>550</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>551</span>
|
|
||||||
<span class='line'>552</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'>553</span> * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development.
|
|
||||||
<span class='line'>554</span> *
|
|
||||||
<span class='line'>555</span> * @param {String} description A string, usually the class under test.
|
|
||||||
<span class='line'>556</span> * @param {Function} specDefinitions function that defines several specs.
|
|
||||||
<span class='line'>557</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'>558</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xdescribe</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>559</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">xdescribe</span><span class="PUNC">(</span><span class="NAME">description</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">specDefinitions</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>560</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>561</span>
|
|
||||||
<span class='line'>562</span>
|
|
||||||
<span class='line'>563</span> </span><span class="COMM">// Provide the XMLHttpRequest class for IE 5.x-6.x:</span><span class="WHIT">
|
|
||||||
<span class='line'>564</span> </span><span class="NAME">jasmine.XmlHttpRequest</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>565</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>566</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.6.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>567</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>568</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>569</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>570</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP.3.0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>571</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>572</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>573</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>574</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Msxml2.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>575</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>576</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>577</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>578</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">ActiveXObject</span><span class="PUNC">(</span><span class="STRN">"Microsoft.XMLHTTP"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>579</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>580</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>581</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"This browser does not support XMLHttpRequest."</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>582</span> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">XMLHttpRequest</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>583</span> </span></pre></body></html>
|
|
|
@ -1,190 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="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">
|
|
||||||
<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">
|
|
||||||
<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">
|
|
||||||
<span class='line'> 4</span> </span><span class="WHIT"> </span><span class="NAME">this.logRunningSpecs</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">
|
|
||||||
<span class='line'> 5</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span>
|
|
||||||
<span class='line'> 7</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">
|
|
||||||
<span class='line'> 8</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">
|
|
||||||
<span class='line'> 9</span>
|
|
||||||
<span class='line'> 10</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">
|
|
||||||
<span class='line'> 11</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">
|
|
||||||
<span class='line'> 12</span>
|
|
||||||
<span class='line'> 13</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">
|
|
||||||
<span class='line'> 14</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">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</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">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span>
|
|
||||||
<span class='line'> 20</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">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">attr</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"className"</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</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">
|
|
||||||
<span class='line'> 23</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">el.setAttribute</span><span class="PUNC">(</span><span class="NAME">attr</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="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span>
|
|
||||||
<span class='line'> 28</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">
|
|
||||||
<span class='line'> 29</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span>
|
|
||||||
<span class='line'> 31</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">
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">showPassed</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">showSkipped</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span>
|
|
||||||
<span class='line'> 34</span> </span><span class="WHIT"> </span><span class="NAME">this.outerDiv</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">'jasmine_reporter'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </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">'banner'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </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">'logo'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="STRN">"Jasmine"</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </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="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'version'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">runner.env.versionString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </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">'options'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</span> </span><span class="WHIT"> </span><span class="STRN">"Show "</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="WHIT"> </span><span class="NAME">showPassed</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">'input'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"__jasmine_TrivialReporter_showPassed__"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'checkbox'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'label'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">"for"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"__jasmine_TrivialReporter_showPassed__"</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">" passed "</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="NAME">showSkipped</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">'input'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="NAME">id</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"__jasmine_TrivialReporter_showSkipped__"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">type</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'checkbox'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="NAME">this.createDom</span><span class="PUNC">(</span><span class="STRN">'label'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT"> </span><span class="STRN">"for"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"__jasmine_TrivialReporter_showSkipped__"</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">" skipped"</span><span class="PUNC">)</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="PUNC">)</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span> </span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span>
|
|
||||||
<span class='line'> 48</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">
|
|
||||||
<span class='line'> 49</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">
|
|
||||||
<span class='line'> 50</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="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">this.finishedAtSpan</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="WHIT"> </span><span class="NAME">className</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'finished-at'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">""</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span>
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="NAME">this.document.body.appendChild</span><span class="PUNC">(</span><span class="NAME">this.outerDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span>
|
|
||||||
<span class='line'> 56</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">
|
|
||||||
<span class='line'> 57</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">
|
|
||||||
<span class='line'> 58</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">
|
|
||||||
<span class='line'> 59</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">
|
|
||||||
<span class='line'> 60</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">
|
|
||||||
<span class='line'> 61</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">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">suite.id</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">
|
|
||||||
<span class='line'> 63</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.outerDiv</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</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">
|
|
||||||
<span class='line'> 65</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.id</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">parentDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">suiteDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span>
|
|
||||||
<span class='line'> 70</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">
|
|
||||||
<span class='line'> 71</span>
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="NAME">showPassed.onchange</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">evt</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">evt.target.checked</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">' show-passed'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 76</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 77</span> </span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className.replace</span><span class="PUNC">(</span><span class="REGX">/ show-passed/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 78</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span>
|
|
||||||
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="NAME">showSkipped.onchange</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">evt</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">evt.target.checked</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">' show-skipped'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">self.outerDiv.className.replace</span><span class="PUNC">(</span><span class="REGX">/ show-skipped/</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 88</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 89</span>
|
|
||||||
<span class='line'> 90</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">
|
|
||||||
<span class='line'> 91</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">
|
|
||||||
<span class='line'> 92</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">
|
|
||||||
<span class='line'> 93</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">
|
|
||||||
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="COMM">//do it twice for IE</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</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">
|
|
||||||
<span class='line'> 96</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">
|
|
||||||
<span class='line'> 97</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">
|
|
||||||
<span class='line'> 98</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">
|
|
||||||
<span class='line'> 99</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">
|
|
||||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="NAME">specCount</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>103</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">
|
|
||||||
<span class='line'>104</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">
|
|
||||||
<span class='line'>105</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">
|
|
||||||
<span class='line'>106</span>
|
|
||||||
<span class='line'>107</span> </span><span class="WHIT"> </span><span class="NAME">this.finishedAtSpan.appendChild</span><span class="PUNC">(</span><span class="NAME">document.createTextNode</span><span class="PUNC">(</span><span class="STRN">"Finished at "</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="NAME">toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>108</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span>
|
|
||||||
<span class='line'>110</span> </span><span class="NAME">jasmine.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">
|
|
||||||
<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="NAME">suite.results</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="KEYW">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">
|
|
||||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="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">
|
|
||||||
<span class='line'>114</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">
|
|
||||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">suite.id</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">
|
|
||||||
<span class='line'>117</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span>
|
|
||||||
<span class='line'>119</span> </span><span class="NAME">jasmine.TrivialReporter.prototype.reportSpecStarting</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">
|
|
||||||
<span class='line'>120</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.logRunningSpecs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">this.log</span><span class="PUNC">(</span><span class="STRN">'>> Jasmine Running '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">spec.suite.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">spec.description</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'...'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>124</span>
|
|
||||||
<span class='line'>125</span> </span><span class="NAME">jasmine.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">
|
|
||||||
<span class='line'>126</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">
|
|
||||||
<span class='line'>127</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">
|
|
||||||
<span class='line'>128</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">
|
|
||||||
<span class='line'>129</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">
|
|
||||||
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">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">
|
|
||||||
<span class='line'>132</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">
|
|
||||||
<span class='line'>133</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 class='line'>134</span> </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 class='line'>135</span> </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="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>136</span> </span><span class="WHIT"> </span><span class="NAME">title</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="WHIT">
|
|
||||||
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">spec.description</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>138</span>
|
|
||||||
<span class='line'>139</span>
|
|
||||||
<span class='line'>140</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">
|
|
||||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">messagesDiv</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">'messages'</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>142</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">
|
|
||||||
<span class='line'>143</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">
|
|
||||||
<span class='line'>144</span>
|
|
||||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'log'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span> </span><span class="WHIT"> </span><span class="NAME">messagesDiv.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">'resultMessage log'</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">result.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>147</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="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.type</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'expect'</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </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">
|
|
||||||
<span class='line'>148</span> </span><span class="WHIT"> </span><span class="NAME">messagesDiv.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">'resultMessage fail'</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">result.message</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>149</span>
|
|
||||||
<span class='line'>150</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">result.trace.stack</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>151</span> </span><span class="WHIT"> </span><span class="NAME">messagesDiv.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">
|
|
||||||
<span class='line'>152</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span>
|
|
||||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">messagesDiv.childNodes.length</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 class='line'>157</span> </span><span class="WHIT"> </span><span class="NAME">specDiv.appendChild</span><span class="PUNC">(</span><span class="NAME">messagesDiv</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>158</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>159</span>
|
|
||||||
<span class='line'>160</span> </span><span class="WHIT"> </span><span class="NAME">this.suiteDivs</span><span class="PUNC">[</span><span class="NAME">spec.suite.id</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">
|
|
||||||
<span class='line'>161</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>162</span>
|
|
||||||
<span class='line'>163</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">
|
|
||||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">console</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">console</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">console</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">console.log</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">
|
|
||||||
<span class='line'>166</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span>
|
|
||||||
<span class='line'>168</span> </span><span class="NAME">jasmine.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">
|
|
||||||
<span class='line'>169</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">
|
|
||||||
<span class='line'>170</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>171</span>
|
|
||||||
<span class='line'>172</span> </span><span class="NAME">jasmine.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">
|
|
||||||
<span class='line'>173</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">
|
|
||||||
<span class='line'>174</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">
|
|
||||||
<span class='line'>175</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">
|
|
||||||
<span class='line'>176</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">
|
|
||||||
<span class='line'>177</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">
|
|
||||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>179</span>
|
|
||||||
<span class='line'>180</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">
|
|
||||||
<span class='line'>181</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">
|
|
||||||
<span class='line'>182</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>183</span> </span></pre></body></html>
|
|
|
@ -1,191 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">// Mock setTimeout, clearTimeout</span><span class="WHIT">
|
|
||||||
<span class='line'> 2</span> </span><span class="COMM">// Contributed by Pivotal Computer Systems, www.pivotalsf.com</span><span class="WHIT">
|
|
||||||
<span class='line'> 3</span>
|
|
||||||
<span class='line'> 4</span> </span><span class="NAME">jasmine.FakeTimer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span> </span><span class="WHIT"> </span><span class="NAME">this.reset</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 6</span>
|
|
||||||
<span class='line'> 7</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">self</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="NAME">self.setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 9</span> </span><span class="WHIT"> </span><span class="NAME">self.timeoutsMade</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="NAME">self.scheduleFunction</span><span class="PUNC">(</span><span class="NAME">self.timeoutsMade</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">self.timeoutsMade</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 12</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span>
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="NAME">self.setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="NAME">self.timeoutsMade</span><span class="PUNC">++</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="NAME">self.scheduleFunction</span><span class="PUNC">(</span><span class="NAME">self.timeoutsMade</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">self.timeoutsMade</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span>
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">self.clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="NAME">self.scheduledFunctions</span><span class="PUNC">[</span><span class="NAME">timeoutKey</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 23</span>
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="NAME">self.clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="NAME">self.scheduledFunctions</span><span class="PUNC">[</span><span class="NAME">timeoutKey</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span>
|
|
||||||
<span class='line'> 28</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span>
|
|
||||||
<span class='line'> 30</span> </span><span class="NAME">jasmine.FakeTimer.prototype.reset</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span> </span><span class="WHIT"> </span><span class="NAME">this.timeoutsMade</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 class='line'> 32</span> </span><span class="WHIT"> </span><span class="NAME">this.scheduledFunctions</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span> </span><span class="WHIT"> </span><span class="NAME">this.nowMillis</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 class='line'> 34</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span>
|
|
||||||
<span class='line'> 36</span> </span><span class="NAME">jasmine.FakeTimer.prototype.tick</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">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">oldMillis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.nowMillis</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">newMillis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oldMillis</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="NAME">this.runFunctionsWithinRange</span><span class="PUNC">(</span><span class="NAME">oldMillis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">newMillis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</span> </span><span class="WHIT"> </span><span class="NAME">this.nowMillis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">newMillis</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 41</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span>
|
|
||||||
<span class='line'> 43</span> </span><span class="NAME">jasmine.FakeTimer.prototype.runFunctionsWithinRange</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">oldMillis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nowMillis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">scheduledFunc</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">funcsToRun</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</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">timeoutKey</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this.scheduledFunctions</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="NAME">scheduledFunc</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.scheduledFunctions</span><span class="PUNC">[</span><span class="NAME">timeoutKey</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">scheduledFunc</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span> </span><span class="WHIT"> </span><span class="NAME">scheduledFunc.runAtMillis</span><span class="WHIT"> </span><span class="PUNC">>=</span><span class="WHIT"> </span><span class="NAME">oldMillis</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT">
|
|
||||||
<span class='line'> 50</span> </span><span class="WHIT"> </span><span class="NAME">scheduledFunc.runAtMillis</span><span class="WHIT"> </span><span class="PUNC"><=</span><span class="WHIT"> </span><span class="NAME">nowMillis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="NAME">funcsToRun.push</span><span class="PUNC">(</span><span class="NAME">scheduledFunc</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="NAME">this.scheduledFunctions</span><span class="PUNC">[</span><span class="NAME">timeoutKey</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.undefined</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 55</span>
|
|
||||||
<span class='line'> 56</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">funcsToRun.length</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 class='line'> 57</span> </span><span class="WHIT"> </span><span class="NAME">funcsToRun.sort</span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">a</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">b</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">a.runAtMillis</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="WHIT"> </span><span class="NAME">b.runAtMillis</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 60</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">funcsToRun.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">++</span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="WHIT"> </span><span class="KEYW">try</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">funcToRun</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">funcsToRun</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 63</span> </span><span class="WHIT"> </span><span class="NAME">this.nowMillis</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">funcToRun.runAtMillis</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</span> </span><span class="WHIT"> </span><span class="NAME">funcToRun.funcToCall</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">funcToRun.recurring</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="WHIT"> </span><span class="NAME">this.scheduleFunction</span><span class="PUNC">(</span><span class="NAME">funcToRun.timeoutKey</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span> </span><span class="WHIT"> </span><span class="NAME">funcToRun.funcToCall</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 68</span> </span><span class="WHIT"> </span><span class="NAME">funcToRun.millis</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 69</span> </span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 70</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 71</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">catch</span><span class="PUNC">(</span><span class="NAME">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 72</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 73</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 74</span> </span><span class="WHIT"> </span><span class="NAME">this.runFunctionsWithinRange</span><span class="PUNC">(</span><span class="NAME">oldMillis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nowMillis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 75</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 76</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 77</span>
|
|
||||||
<span class='line'> 78</span> </span><span class="NAME">jasmine.FakeTimer.prototype.scheduleFunction</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurring</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 79</span> </span><span class="WHIT"> </span><span class="NAME">this.scheduledFunctions</span><span class="PUNC">[</span><span class="NAME">timeoutKey</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 80</span> </span><span class="WHIT"> </span><span class="NAME">runAtMillis</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">this.nowMillis</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 81</span> </span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 82</span> </span><span class="WHIT"> </span><span class="NAME">recurring</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">recurring</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 83</span> </span><span class="WHIT"> </span><span class="NAME">timeoutKey</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">timeoutKey</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 84</span> </span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="WHIT">
|
|
||||||
<span class='line'> 85</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 86</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 87</span>
|
|
||||||
<span class='line'> 88</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 89</span> * @namespace
|
|
||||||
<span class='line'> 90</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 91</span> </span><span class="NAME">jasmine.Clock</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 92</span> </span><span class="WHIT"> </span><span class="NAME">defaultFakeTimer</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">jasmine.FakeTimer</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 93</span>
|
|
||||||
<span class='line'> 94</span> </span><span class="WHIT"> </span><span class="NAME">reset</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 95</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.assertInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 96</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer.reset</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 97</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'> 98</span>
|
|
||||||
<span class='line'> 99</span> </span><span class="WHIT"> </span><span class="NAME">tick</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>100</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.assertInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>101</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer.tick</span><span class="PUNC">(</span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>102</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>103</span>
|
|
||||||
<span class='line'>104</span> </span><span class="WHIT"> </span><span class="NAME">runFunctionsWithinRange</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oldMillis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nowMillis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>105</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange</span><span class="PUNC">(</span><span class="NAME">oldMillis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">nowMillis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>106</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>107</span>
|
|
||||||
<span class='line'>108</span> </span><span class="WHIT"> </span><span class="NAME">scheduleFunction</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurring</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>109</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer.scheduleFunction</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">recurring</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>110</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>111</span>
|
|
||||||
<span class='line'>112</span> </span><span class="WHIT"> </span><span class="NAME">useMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>113</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.Clock.isInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>114</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">spec</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.getEnv</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">currentSpec</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>115</span> </span><span class="WHIT"> </span><span class="NAME">spec.after</span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.uninstallMock</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>116</span>
|
|
||||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installMock</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>119</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>120</span>
|
|
||||||
<span class='line'>121</span> </span><span class="WHIT"> </span><span class="NAME">installMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>122</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>124</span>
|
|
||||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="NAME">uninstallMock</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.assertInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>129</span>
|
|
||||||
<span class='line'>130</span> </span><span class="WHIT"> </span><span class="NAME">real</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>131</span> </span><span class="WHIT"> </span><span class="NAME">setTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>132</span> </span><span class="WHIT"> </span><span class="NAME">clearTimeout</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>133</span> </span><span class="WHIT"> </span><span class="NAME">setInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>134</span> </span><span class="WHIT"> </span><span class="NAME">clearInterval</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT">
|
|
||||||
<span class='line'>135</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>136</span>
|
|
||||||
<span class='line'>137</span> </span><span class="WHIT"> </span><span class="NAME">assertInstalled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>138</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">jasmine.Clock.isInstalled</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>139</span> </span><span class="WHIT"> </span><span class="KEYW">throw</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Error</span><span class="PUNC">(</span><span class="STRN">"Mock clock is not installed, use jasmine.Clock.useMock()"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>140</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>141</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>142</span>
|
|
||||||
<span class='line'>143</span> </span><span class="WHIT"> </span><span class="NAME">isInstalled</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>144</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.defaultFakeTimer</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>145</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
|
|
||||||
<span class='line'>146</span>
|
|
||||||
<span class='line'>147</span> </span><span class="WHIT"> </span><span class="NAME">installed</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="WHIT">
|
|
||||||
<span class='line'>148</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>149</span> </span><span class="NAME">jasmine.Clock.installed</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.real</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>150</span>
|
|
||||||
<span class='line'>151</span> </span><span class="COMM">//else for IE support</span><span class="WHIT">
|
|
||||||
<span class='line'>152</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>153</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>154</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>155</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>156</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setTimeout</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>157</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>158</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>159</span>
|
|
||||||
<span class='line'>160</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">setInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>161</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>162</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>163</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>164</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.setInterval</span><span class="PUNC">(</span><span class="NAME">funcToCall</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">millis</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>165</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>166</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>167</span>
|
|
||||||
<span class='line'>168</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearTimeout</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>169</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>170</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>171</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>172</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearTimeout</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>173</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>174</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>175</span>
|
|
||||||
<span class='line'>176</span> </span><span class="NAME">jasmine.getGlobal</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">clearInterval</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>177</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">jasmine.Clock.installed.clearTimeout.apply</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>178</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval.apply</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">arguments</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>179</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'>180</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">jasmine.Clock.installed.clearInterval</span><span class="PUNC">(</span><span class="NAME">timeoutKey</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>181</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'>182</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'>183</span>
|
|
||||||
<span class='line'>184</span> </span></pre></body></html>
|
|
|
@ -1,75 +0,0 @@
|
||||||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
|
||||||
.KEYW {color: #933;}
|
|
||||||
.COMM {color: #bbb; font-style: italic;}
|
|
||||||
.NUMB {color: #393;}
|
|
||||||
.STRN {color: #393;}
|
|
||||||
.REGX {color: #339;}
|
|
||||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
|
||||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/**
|
|
||||||
<span class='line'> 2</span> * @namespace
|
|
||||||
<span class='line'> 3</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 4</span> </span><span class="NAME">jasmine.util</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 5</span>
|
|
||||||
<span class='line'> 6</span> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 7</span> * Declare that a child class inherit it's prototype from the parent class.
|
|
||||||
<span class='line'> 8</span> *
|
|
||||||
<span class='line'> 9</span> * @private
|
|
||||||
<span class='line'> 10</span> * @param {Function} childClass
|
|
||||||
<span class='line'> 11</span> * @param {Function} parentClass
|
|
||||||
<span class='line'> 12</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 13</span> </span><span class="NAME">jasmine.util.inherit</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">childClass</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">parentClass</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 14</span> </span><span class="WHIT"> </span><span class="COMM">/**
|
|
||||||
<span class='line'> 15</span> * @private
|
|
||||||
<span class='line'> 16</span> */</span><span class="WHIT">
|
|
||||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">subclass</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="NAME">subclass.prototype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">parentClass.prototype</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="NAME">childClass.prototype</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">subclass</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 21</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 22</span>
|
|
||||||
<span class='line'> 23</span> </span><span class="NAME">jasmine.util.formatException</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">e</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 24</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">lineNumber</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 25</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.line</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 26</span> </span><span class="WHIT"> </span><span class="NAME">lineNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e.line</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 27</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 28</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.lineNumber</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 29</span> </span><span class="WHIT"> </span><span class="NAME">lineNumber</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e.lineNumber</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 30</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 31</span>
|
|
||||||
<span class='line'> 32</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">file</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 33</span>
|
|
||||||
<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">e.sourceURL</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 35</span> </span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e.sourceURL</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 36</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 37</span> </span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.fileName</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 38</span> </span><span class="WHIT"> </span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">e.fileName</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 39</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 40</span>
|
|
||||||
<span class='line'> 41</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="PUNC">(</span><span class="NAME">e.name</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">e.message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">e.name</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">e.message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">e.toString</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 42</span>
|
|
||||||
<span class='line'> 43</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">file</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">lineNumber</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 44</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="NAME">file</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">' (line '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">lineNumber</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">')'</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 45</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
|
||||||
<span class='line'> 46</span>
|
|
||||||
<span class='line'> 47</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 48</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 49</span>
|
|
||||||
<span class='line'> 50</span> </span><span class="NAME">jasmine.util.htmlEscape</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">
|
|
||||||
<span class='line'> 51</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">str</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 52</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">str.replace</span><span class="PUNC">(</span><span class="REGX">/&/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'&'</span><span class="PUNC">)</span><span class="WHIT">
|
|
||||||
<span class='line'> 53</span> </span><span class="WHIT"> </span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/</g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'<'</span><span class="PUNC">)</span><span class="WHIT">
|
|
||||||
<span class='line'> 54</span> </span><span class="WHIT"> </span><span class="PUNC">.</span><span class="NAME">replace</span><span class="PUNC">(</span><span class="REGX">/>/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">
|
|
||||||
<span class='line'> 55</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 56</span>
|
|
||||||
<span class='line'> 57</span> </span><span class="NAME">jasmine.util.argsToArray</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">args</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 58</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">arrayOfArgs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 59</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">args.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="NAME">arrayOfArgs.push</span><span class="PUNC">(</span><span class="NAME">args</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 class='line'> 60</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">arrayOfArgs</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 61</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 62</span>
|
|
||||||
<span class='line'> 63</span> </span><span class="NAME">jasmine.util.extend</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">destination</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
|
||||||
<span class='line'> 64</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">property</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="NAME">destination</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">source</span><span class="PUNC">[</span><span class="NAME">property</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 65</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">destination</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 66</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
|
||||||
<span class='line'> 67</span>
|
|
||||||
<span class='line'> 68</span> </span></pre></body></html>
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 29307537f7be93bac7c7dba8f04e36a2dd4db2ce
|
Loading…
Reference in New Issue