Moved currentlyRunningTests to Runner instead of spec
This commit is contained in:
@@ -530,7 +530,7 @@ jasmine.version_= {
|
||||
"major": 0,
|
||||
"minor": 10,
|
||||
"build": 0,
|
||||
"revision": 1256142331
|
||||
"revision": 1256142778
|
||||
};
|
||||
/**
|
||||
* @namespace
|
||||
@@ -978,11 +978,6 @@ jasmine.Matchers.pp = function(str) {
|
||||
return jasmine.util.htmlEscape(jasmine.pp(str));
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.getResults = function() {
|
||||
return this.results_;
|
||||
};
|
||||
|
||||
jasmine.Matchers.prototype.results = function() {
|
||||
return this.results_;
|
||||
};
|
||||
@@ -1039,8 +1034,6 @@ jasmine.Matchers.prototype.toEqual = function(expected) {
|
||||
matcherName: 'toEqual', expected: expected, actual: this.actual
|
||||
});
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_equal = jasmine.Matchers.prototype.toEqual;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using the ! of jasmine.Matchers.toEqual
|
||||
@@ -1050,8 +1043,6 @@ jasmine.Matchers.prototype.toNotEqual = function(expected) {
|
||||
return this.report(!this.env.equals_(this.actual, expected),
|
||||
'Expected ' + jasmine.Matchers.pp(expected) + ' to not equal ' + jasmine.Matchers.pp(this.actual) + ', but it does.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_not_equal = jasmine.Matchers.prototype.toNotEqual;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes
|
||||
@@ -1063,8 +1054,6 @@ jasmine.Matchers.prototype.toMatch = function(reg_exp) {
|
||||
return this.report((new RegExp(reg_exp).test(this.actual)),
|
||||
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to match ' + reg_exp + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_match = jasmine.Matchers.prototype.toMatch;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch
|
||||
@@ -1074,8 +1063,6 @@ jasmine.Matchers.prototype.toNotMatch = function(reg_exp) {
|
||||
return this.report((!new RegExp(reg_exp).test(this.actual)),
|
||||
'Expected ' + jasmine.Matchers.pp(this.actual) + ' to not match ' + reg_exp + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_not_match = jasmine.Matchers.prototype.toNotMatch;
|
||||
|
||||
/**
|
||||
* Matcher that compares the acutal to undefined.
|
||||
@@ -1084,8 +1071,6 @@ jasmine.Matchers.prototype.toBeDefined = function() {
|
||||
return this.report((this.actual !== undefined),
|
||||
'Expected a value to be defined but it was undefined.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_defined = jasmine.Matchers.prototype.toBeDefined;
|
||||
|
||||
/**
|
||||
* Matcher that compares the actual to null.
|
||||
@@ -1095,8 +1080,6 @@ jasmine.Matchers.prototype.toBeNull = function() {
|
||||
return this.report((this.actual === null),
|
||||
'Expected a value to be null but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_null = jasmine.Matchers.prototype.toBeNull;
|
||||
|
||||
/**
|
||||
* Matcher that boolean not-nots the actual.
|
||||
@@ -1105,8 +1088,6 @@ jasmine.Matchers.prototype.toBeTruthy = function() {
|
||||
return this.report(!!this.actual,
|
||||
'Expected a value to be truthy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_truthy = jasmine.Matchers.prototype.toBeTruthy;
|
||||
|
||||
/**
|
||||
* Matcher that boolean nots the actual.
|
||||
@@ -1115,8 +1096,6 @@ jasmine.Matchers.prototype.toBeFalsy = function() {
|
||||
return this.report(!this.actual,
|
||||
'Expected a value to be falsy but it was ' + jasmine.Matchers.pp(this.actual) + '.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.should_be_falsy = jasmine.Matchers.prototype.toBeFalsy;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was called.
|
||||
@@ -1131,8 +1110,6 @@ jasmine.Matchers.prototype.wasCalled = function() {
|
||||
return this.report((this.actual.wasCalled),
|
||||
'Expected spy "' + this.actual.identity + '" to have been called, but it was not.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.was_called = jasmine.Matchers.prototype.wasCalled;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was not called.
|
||||
@@ -1144,8 +1121,6 @@ jasmine.Matchers.prototype.wasNotCalled = function() {
|
||||
return this.report((!this.actual.wasCalled),
|
||||
'Expected spy "' + this.actual.identity + '" to not have been called, but it was.');
|
||||
};
|
||||
/** @deprecated */
|
||||
jasmine.Matchers.prototype.was_not_called = jasmine.Matchers.prototype.wasNotCalled;
|
||||
|
||||
/**
|
||||
* Matcher that checks to see if the acutal, a Jasmine spy, was called with a set of parameters.
|
||||
@@ -1627,6 +1602,7 @@ jasmine.Runner = function(env) {
|
||||
jasmine.Runner.prototype.execute = function() {
|
||||
var self = this;
|
||||
if (self.env.reporter.reportRunnerStarting) {
|
||||
self.env.currentlyRunningTests = true;
|
||||
self.env.reporter.reportRunnerStarting(this);
|
||||
}
|
||||
self.queue.start(function () {
|
||||
@@ -1646,6 +1622,7 @@ jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
|
||||
|
||||
|
||||
jasmine.Runner.prototype.finishCallback = function() {
|
||||
this.env.currentlyRunningTests = true;
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
};
|
||||
|
||||
@@ -1660,11 +1637,6 @@ jasmine.Runner.prototype.add = function(block) {
|
||||
this.queue.add(block);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Runner.prototype.getAllSuites = function() {
|
||||
return this.suites_;
|
||||
};
|
||||
|
||||
jasmine.Runner.prototype.specs = function () {
|
||||
var suites = this.suites();
|
||||
var specs = [];
|
||||
@@ -1682,11 +1654,6 @@ jasmine.Runner.prototype.suites = function() {
|
||||
jasmine.Runner.prototype.results = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Runner.prototype.getResults = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
/**
|
||||
* Internal representation of a Jasmine specification, or test.
|
||||
*
|
||||
@@ -1732,11 +1699,6 @@ jasmine.Spec.prototype.log = function(message) {
|
||||
return this.results_.log(message);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Spec.prototype.getResults = function() {
|
||||
return this.results_;
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.runs = function (func) {
|
||||
var block = new jasmine.Block(this.env, func, this);
|
||||
this.addToQueue(block);
|
||||
@@ -1751,14 +1713,6 @@ jasmine.Spec.prototype.addToQueue = function (block) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @deprecated
|
||||
*/
|
||||
jasmine.Spec.prototype.expects_that = function(actual) {
|
||||
return this.expect(actual);
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.expect = function(actual) {
|
||||
return new (this.getMatchersClass_())(this.env, actual, this.results_);
|
||||
};
|
||||
@@ -1943,11 +1897,6 @@ jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
|
||||
this.after_.push(afterEachFunction);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Suite.prototype.getResults = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.results = function() {
|
||||
return this.queue.results();
|
||||
};
|
||||
@@ -1961,11 +1910,6 @@ jasmine.Suite.prototype.add = function(block) {
|
||||
this.queue.add(block);
|
||||
};
|
||||
|
||||
/** @deprecated */
|
||||
jasmine.Suite.prototype.specCount = function() {
|
||||
return this.specs_.length;
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.specs = function() {
|
||||
return this.specs_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user