Merge branch 'master' of git@github.com:pivotal/jasmine

Conflicts:
	Rakefile
	examples/ruby/Rakefile
	examples/ruby/spec/jasmine_spec.rb
	lib/jasmine-0.9.0.js
	src/Queue.js
This commit is contained in:
Christian Williams 2009-09-08 06:48:57 -07:00
commit 724f1772b7
30 changed files with 3606 additions and 3370 deletions

View File

@ -1,6 +1,37 @@
desc 'Builds lib/jasmine from source'
namespace :build do
task :jasmine => 'build:doc' do
require File.expand_path(File.join(File.dirname(__FILE__), "spec/jasmine_helper.rb"))
def jasmine_sources
sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
sources += Dir.glob('src/*.js').reject{|f| f == 'src/base.js' || sources.include?(f)}.sort
end
def jasmine_filename(version)
"jasmine-#{version['major']}.#{version['minor']}.#{version['build']}.js"
end
def version_hash
JSON.parse(File.new("src/version.json").read);
end
def start_jasmine_server(jasmine_includes)
require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder"))
includes = jasmine_includes +
['/lib/json2.js',
'/lib/TrivialReporter.js']
puts "your tests are here:"
puts " http://localhost:8888/run.html"
Jasmine::SimpleServer.start(8888,
lambda { includes + JasmineHelper.spec_file_urls },
JasmineHelper.dir_mappings)
end
namespace :jasmine do
desc 'Builds lib/jasmine from source'
task :build => 'jasmine:doc' do
puts 'Building Jasmine from source'
require 'json'
sources = jasmine_sources
version = version_hash
@ -21,10 +52,12 @@ jasmine.version_= {
sources.each do |source_filename|
jasmine.puts(File.read(source_filename))
end
jasmine.close
end
desc "Build jasmine documentation"
task :doc do
puts 'Creating Jasmine Documentation'
require 'rubygems'
#sudo gem install ragaskar-jsdoc_helper
require 'jsdoc_helper'
@ -34,32 +67,32 @@ jasmine.version_= {
Rake::Task[:lambda_jsdoc].invoke
end
end
def jasmine_sources
sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
desc "Run jasmine tests of source via server"
task :server do
jasmine_includes = jasmine_sources
start_jasmine_server(jasmine_includes)
end
sources += Dir.glob('src/*.js').reject{|f| f == 'src/base.js' || sources.include?(f)}.sort
end
desc "Build jasmine and run tests via server"
task :server_build => 'jasmine:build' do
def jasmine_filename(version)
"jasmine-#{version['major']}.#{version['minor']}.#{version['build']}.js"
end
jasmine_includes = ['/lib/' + File.basename(Dir.glob("#{JasmineHelper.jasmine_lib_dir}/jasmine*.js").first)]
start_jasmine_server(jasmine_includes)
end
def version_hash
JSON.parse(File.new("src/version.json").read);
end
namespace :test do
desc "Run continuous integration tests"
task :ci => 'build:jasmine' do
require "spec"
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:lambda_ci) do |t|
t.spec_opts = ["--color", "--format", "specdoc"]
t.spec_files = ["spec/jasmine_spec.rb"]
namespace :test do
desc "Run continuous integration tests"
task :ci => 'jasmine:build' do
require "spec"
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:lambda_ci) do |t|
t.spec_opts = ["--color", "--format", "specdoc"]
t.spec_files = ["spec/jasmine_spec.rb"]
end
Rake::Task[:lambda_ci].invoke
end
Rake::Task[:lambda_ci].invoke
end
end
@ -78,7 +111,7 @@ task :jasmine_server do
}
puts "your tests are here:"
puts " http://localhost:8888/"
puts " http://localhost:8888/run.html"
Jasmine::SimpleServer.start(8888, includes + spec_files, dir_mappings)
end

View File

@ -134,7 +134,7 @@ module Jasmine
class SimpleClient
def initialize(selenium_host, selenium_port, selenium_browser_start_command, http_address)
require 'selenium'
require 'selenium/client'
@driver = Selenium::Client::Driver.new(
selenium_host,
selenium_port,

View File

@ -258,7 +258,7 @@ ul.inheritsList
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:58 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -300,7 +300,7 @@ ul.inheritsList
</div>
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:58 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -908,7 +908,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -339,7 +339,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -384,7 +384,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -700,7 +700,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -267,6 +267,33 @@ ul.inheritsList
<!-- ============================== 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">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/jasmine.Runner.html#getAllSuites">getAllSuites</a></b>()
</div>
<div class="description"></div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== events summary ======================== -->
@ -316,6 +343,36 @@ ul.inheritsList
<!-- ============================== method details ========================= -->
<div class="sectionTitle">
Method Detail
</div>
<a name="getAllSuites"> </a>
<div class="fixedFont">
<b>getAllSuites</b>()
</div>
<div class="description">
</div>
<!-- ============================== event details ========================= -->
@ -327,7 +384,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -339,7 +339,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -845,7 +845,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:58 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -267,6 +267,33 @@ ul.inheritsList
<!-- ============================== 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">&nbsp;</td>
<td class="nameDescription">
<div class="fixedFont"><b><a href="../symbols/jasmine.Suite.html#specCount">specCount</a></b>()
</div>
<div class="description"></div>
</td>
</tr>
</tbody>
</table>
<!-- ============================== events summary ======================== -->
@ -334,6 +361,36 @@ ul.inheritsList
<!-- ============================== method details ========================= -->
<div class="sectionTitle">
Method Detail
</div>
<a name="specCount"> </a>
<div class="fixedFont">
<b>specCount</b>()
</div>
<div class="description">
</div>
<!-- ============================== event details ========================= -->
@ -345,7 +402,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:58 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -678,7 +678,7 @@ Jasmine environment.
<!-- ============================== 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 Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:57 GMT-0700 (PDT)
</div>
</body>
</html>

View File

@ -316,7 +316,7 @@ ul.inheritsList
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Wed Sep 02 2009 07:41:14 GMT-0700 (PDT)
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Fri Sep 04 2009 23:03:58 GMT-0700 (PDT)
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
require File.expand_path(File.join(File.dirname(__FILE__), "spec/jasmine_helper.rb"))
namespace :test do
desc "Run continuous integration tests"
require "spec"
@ -11,16 +13,12 @@ end
desc "Run specs via server"
task :jasmine_server do
require File.expand_path(File.join(File.dirname(__FILE__), "../../contrib/ruby/jasmine_spec_builder"))
dir_mappings = {
"/spec" => 'spec'
}
spec_files = Dir.glob("spec/**/*[Ss]pec.js")
require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder"))
puts "your tests are here:"
puts " http://localhost:8888/"
puts " http://localhost:8888/run.html"
Jasmine::SimpleServer.start(8888, spec_files, dir_mappings)
Jasmine::SimpleServer.start(8888,
lambda { JasmineHelper.jasmine + JasmineHelper.spec_file_urls },
JasmineHelper.dir_mappings)
end

View File

@ -0,0 +1,39 @@
class JasmineHelper
def self.jasmine_lib_dir
File.expand_path(File.join(jasmine_root, 'lib'))
end
def self.jasmine_root
File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..'))
end
def self.jasmine
['/lib/' + File.basename(Dir.glob("#{JasmineHelper.jasmine_lib_dir}/jasmine*.js").first)] +
['/lib/json2.js',
'/lib/TrivialReporter.js']
end
def self.jasmine_src_dir
File.expand_path(File.join(jasmine_root, 'src'))
end
def self.jasmine_spec_dir
File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec'))
end
def self.raw_spec_files
Dir.glob(File.join(jasmine_spec_dir, "**/*[Ss]pec.js"))
end
def self.spec_file_urls
raw_spec_files.collect {|f| f.sub(jasmine_spec_dir, "/spec")}
end
def self.dir_mappings
{
"/src" => jasmine_src_dir,
"/spec" => jasmine_spec_dir,
"/lib" => jasmine_lib_dir
}
end
end

View File

@ -1,14 +1,13 @@
require 'rubygems'
require File.expand_path(File.join(File.dirname(__FILE__), "../../../contrib/ruby/jasmine_spec_builder"))
require "selenium_rc"
require File.expand_path(File.join(File.dirname(__FILE__), "jasmine_helper.rb"))
require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder"))
dir_mappings = {
"/spec" => 'spec',
}
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path,
JasmineHelper.jasmine + JasmineHelper.spec_file_urls,
JasmineHelper.dir_mappings)
spec_files = Dir.glob("spec/**/*[Ss]pec.js")
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path, spec_files, dir_mappings)
spec_builder = Jasmine::SpecBuilder.new(spec_files, jasmine_runner)
spec_builder = Jasmine::SpecBuilder.new(JasmineHelper.raw_spec_files, jasmine_runner)
should_stop = false

30
javascript.rake Executable file
View File

@ -0,0 +1,30 @@
namespace :spec do
desc "Run continuous integration tests"
require "spec"
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:javascript) do |t|
t.spec_opts = ["--color", "--format", "specdoc"]
t.spec_files = ["spec/javascript/jasmine_spec.rb"]
end
desc "Run specs via server"
task :jasmine_server do
require File.expand_path(File.join(RAILS_ROOT, "spec/javascript/jasmine_helper.rb"))
require File.expand_path(File.join(RAILS_ROOT, "spec/javascript/jasmine/contrib/ruby/jasmine_runner.rb"))
includes = ['lib/' + File.basename(Dir.glob("#{JasmineHelper.jasmine_lib_dir}/jasmine*.js").first),
'lib/json2.js',
'lib/TrivialReporter.js']
puts "your tests are here:"
puts " http://localhost:8888/run.html"
Jasmine::SimpleServer.start(8888,
lambda { includes + JasmineHelper.spec_file_urls },
JasmineHelper.dir_mappings)
end
end

File diff suppressed because it is too large Load Diff

40
spec/jasmine_helper.rb Executable file
View File

@ -0,0 +1,40 @@
class JasmineHelper
def self.jasmine_lib_dir
File.expand_path(File.join(jasmine_root, 'lib'))
end
def self.jasmine
['/lib/' + File.basename(Dir.glob("#{JasmineHelper.jasmine_lib_dir}/jasmine*.js").first)] +
['/lib/json2.js',
'/lib/TrivialReporter.js']
end
def self.jasmine_root
File.expand_path(File.join(File.dirname(__FILE__), '..'))
end
def self.jasmine_src_dir
File.expand_path(File.join(jasmine_root, 'src'))
end
def self.jasmine_spec_dir
File.expand_path(File.join(jasmine_root, 'spec'))
end
def self.raw_spec_files
Dir.glob(File.join(jasmine_spec_dir, "**/*[Ss]pec.js"))
end
def self.spec_file_urls
raw_spec_files.collect {|f| f.sub(jasmine_spec_dir, "/spec")}
end
def self.dir_mappings
{
"/src" => jasmine_src_dir,
"/spec" => jasmine_spec_dir,
"/lib" => jasmine_lib_dir
}
end
end

View File

@ -1,23 +1,13 @@
require 'rubygems'
require File.expand_path(File.join(File.dirname(__FILE__), "../contrib/ruby/jasmine_spec_builder"))
require "selenium_rc"
require File.expand_path(File.join(File.dirname(__FILE__), "jasmine_helper.rb"))
require File.expand_path(File.join(JasmineHelper.jasmine_root, "contrib/ruby/jasmine_spec_builder"))
dir_mappings = {
"/spec" => 'spec',
"/lib" => 'lib',
"/src" => 'src'
}
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path,
JasmineHelper.jasmine + JasmineHelper.spec_file_urls,
JasmineHelper.dir_mappings)
def jasmine_sources
sources = ["src/base.js", "src/util.js", "src/Env.js", "src/Reporter.js", "src/Block.js"]
sources += Dir.glob('src/*.js').reject{|f| f == 'src/base.js' || sources.include?(f)}.sort
end
includes = jasmine_sources + ['lib/json2.js', 'lib/TrivialReporter.js']
spec_files = Dir.glob("spec/**/*[Ss]pec.js")
jasmine_runner = Jasmine::Runner.new(SeleniumRC::Server.new.jar_path, includes + spec_files, dir_mappings)
spec_builder = Jasmine::SpecBuilder.new(spec_files, jasmine_runner)
spec_builder = Jasmine::SpecBuilder.new(JasmineHelper.raw_spec_files, jasmine_runner)
should_stop = false

View File

@ -1,16 +1,10 @@
describe('jasmine.Reporter', function() {
var env;
var fakeTimer;
beforeEach(function() {
env = new jasmine.Env();
fakeTimer = new jasmine.FakeTimer();
env.setTimeout = fakeTimer.setTimeout;
env.clearTimeout = fakeTimer.clearTimeout;
env.setInterval = fakeTimer.setInterval;
env.clearInterval = fakeTimer.clearInterval;
});
it('should get called from the test runner', function() {
@ -57,7 +51,6 @@ describe('jasmine.Reporter', function() {
var runner = env.currentRunner;
runner.execute();
fakeTimer.tick(0);
expect(foo).toEqual(3); // 'foo was expected to be 3, was ' + foo);
expect(bar).toEqual(2); // 'bar was expected to be 2, was ' + bar);

View File

@ -30,7 +30,6 @@ describe('RunnerTest', function() {
});
env.currentRunner.execute();
fakeTimer.tick(0);
var runnerResults = env.currentRunner.getResults();
expect(runnerResults.totalCount).toEqual(2);
@ -57,8 +56,7 @@ describe('RunnerTest', function() {
});
env.currentRunner.execute();
fakeTimer.tick(0);
var runnerResults = env.currentRunner.getResults();
expect(runnerResults.totalCount).toEqual(1);
expect(runnerResults.passedCount).toEqual(0);
@ -83,7 +81,6 @@ describe('RunnerTest', function() {
});
env.currentRunner.execute();
fakeTimer.tick(0);
var results = env.currentRunner.getResults();
expect(results.totalCount).toEqual(2);

View File

@ -64,7 +64,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(specWithNoBody.description).toEqual('new spec');
@ -117,7 +116,6 @@ describe("jasmine spec running", function () {
expect(foo).toEqual(0);
specWithRunsAndWaits.execute();
fakeTimer.tick(0);
expect(foo).toEqual(1);
fakeTimer.tick(500);
@ -142,7 +140,6 @@ describe("jasmine spec running", function () {
});
a_spec.execute();
fakeTimer.tick(0);
expect(a_spec.results.getItems().length).toEqual(1); // 'No call to waits(): Spec queue did not run all functions';
expect(a_spec.results.getItems()[0].passed()).toEqual(true); // 'No call to waits(): Queued expectation failed';
@ -163,7 +160,6 @@ describe("jasmine spec running", function () {
});
a_spec.execute();
fakeTimer.tick(0);
expect(a_spec.results.getItems().length).toEqual(0);
@ -362,7 +358,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(log).toEqual("specafter2after1");
});
@ -394,7 +389,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(foo).toEqual(1);
expect(bar).toEqual(0);
@ -428,7 +422,6 @@ describe("jasmine spec running", function () {
});
suiteWithBefore.execute();
fakeTimer.tick(0);
var suite = suiteWithBefore;
@ -457,7 +450,6 @@ describe("jasmine spec running", function () {
});
suiteWithAfter.execute();
fakeTimer.tick(0);
suite = suiteWithAfter;
expect(suite.afterEach.length).toEqual(1);
@ -520,7 +512,6 @@ describe("jasmine spec running", function () {
expect(baz).toEqual(0);
expect(quux).toEqual(0);
nested.execute();
fakeTimer.tick(0);
expect(foo).toEqual(1);
expect(bar).toEqual(1);
@ -556,7 +547,6 @@ describe("jasmine spec running", function () {
expect(reachedFirstWaitsFor).toEqual(false);
waitsSuite.execute();
fakeTimer.tick(0);
expect(reachedFirstWaitsFor).toEqual(true);
expect(foo).toEqual(0);
@ -640,7 +630,6 @@ describe("jasmine spec running", function () {
expect(foo).toEqual(0);
expect(bar).toEqual(0);
suiteWithBefore.execute();
fakeTimer.tick(0);
expect(bar).toEqual(0);
expect(foo).toEqual(1);
@ -682,7 +671,6 @@ describe("jasmine spec running", function () {
expect(foo).toEqual(0);
suiteWithAfter.execute();
fakeTimer.tick(0);
expect(firstSpecHasRun).toEqual(true);
@ -819,7 +807,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(report).toEqual("firstsecond");
var suiteResults = suite.getResults();
@ -858,7 +845,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(report).toEqual("firstsecondthird"); // "all tests should run");
//After each errors should not go in spec results because it confuses the count.
@ -925,7 +911,6 @@ describe("jasmine spec running", function () {
});
env.execute();
fakeTimer.tick(0);
var expected = [
@ -987,7 +972,6 @@ describe("jasmine spec running", function () {
});
env.execute();
fakeTimer.tick(0);
var runnerResults = env.currentRunner.getResults();
expect(runnerResults.totalCount).toEqual(3);
@ -1105,7 +1089,6 @@ describe("jasmine spec running", function () {
});
suite.execute();
fakeTimer.tick(0);
expect(spec1Matcher.matcherForSuite("expected")).toEqual("matcherForSuite: actual: xxx; expected: expected");
expect(spec1Matcher.matcherForSpec("expected")).toEqual("matcherForSpec: actual: xxx; expected: expected");

View File

@ -11,6 +11,8 @@ jasmine.Env = function() {
this.reporter = new jasmine.MultiReporter();
this.updateInterval = 0;
this.updateInterval = 0;
this.lastUpdate = 0;
this.specFilter = function() {

View File

@ -49,7 +49,6 @@ jasmine.Queue.prototype._next = function () {
self.finish();
}
};
var now = new Date().getTime();
if (this.env.updateInterval && now - this.env.lastUpdate > this.env.updateInterval) {
this.env.lastUpdate = now;
@ -57,6 +56,7 @@ jasmine.Queue.prototype._next = function () {
} else {
doNext();
}
};
jasmine.Queue.prototype.finish = function () {