Deprecate getResults() (use results()). Add some unit test coverage for jasmine.Spec. Add some unit test coverage for JsApiReporterSpec.
This commit is contained in:
19
src/Env.js
19
src/Env.js
@@ -30,6 +30,9 @@ jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
|
||||
jasmine.Env.prototype.setInterval = jasmine.setInterval;
|
||||
jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
|
||||
|
||||
/**
|
||||
* @returns an object containing jasmine version build info, if set.
|
||||
*/
|
||||
jasmine.Env.prototype.version = function () {
|
||||
if (jasmine.version_) {
|
||||
return jasmine.version_;
|
||||
@@ -38,6 +41,20 @@ jasmine.Env.prototype.version = function () {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns a sequential integer starting at 0
|
||||
*/
|
||||
jasmine.Env.prototype.nextSpecId = function () {
|
||||
return this.nextSpecId_++;
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns a sequential integer starting at 0
|
||||
*/
|
||||
jasmine.Env.prototype.nextSuiteId = function () {
|
||||
return this.nextSuiteId_++;
|
||||
};
|
||||
|
||||
/**
|
||||
* Register a reporter to receive status updates from Jasmine.
|
||||
* @param {jasmine.Reporter} reporter An object which will receive status updates.
|
||||
@@ -98,7 +115,7 @@ jasmine.Env.prototype.it = function(description, func) {
|
||||
|
||||
jasmine.Env.prototype.xit = function(desc, func) {
|
||||
return {
|
||||
id: this.nextSpecId_++,
|
||||
id: this.nextSpecId(),
|
||||
runs: function() {
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user