Merged in Xian's speed fixes
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user