Add versioning to jasmine
This commit is contained in:
@@ -512,6 +512,13 @@ jasmine.include = function(url, opt_global) {
|
||||
return eval(xhr.responseText);
|
||||
}
|
||||
};
|
||||
|
||||
jasmine.version_= {
|
||||
"major": 0,
|
||||
"minor": 9,
|
||||
"build": 0,
|
||||
"revision": 0
|
||||
};
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
@@ -601,6 +608,17 @@ jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout;
|
||||
jasmine.Env.prototype.setInterval = jasmine.setInterval;
|
||||
jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
|
||||
|
||||
jasmine.Env.prototype.version = function () {
|
||||
if (jasmine.version_) {
|
||||
return parseInt(jasmine.version_.major + "" +
|
||||
jasmine.version_.minor + "" +
|
||||
jasmine.version_.build + "" +
|
||||
jasmine.version_.revision + "");
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Register a reporter to receive status updates from Jasmine.
|
||||
* @param {jasmine.Reporter} reporter An object which will receive status updates.
|
||||
@@ -799,8 +817,7 @@ jasmine.Block = function(env, func, spec) {
|
||||
this.spec = spec;
|
||||
};
|
||||
|
||||
jasmine.Block.prototype.execute = function(onComplete) {
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...');
|
||||
jasmine.Block.prototype.execute = function(onComplete) {
|
||||
try {
|
||||
this.func.apply(this.spec);
|
||||
} catch (e) {
|
||||
@@ -1651,6 +1668,7 @@ jasmine.Spec.prototype.execute = function(onComplete) {
|
||||
spec.finish(onComplete);
|
||||
return;
|
||||
}
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.suite.description + ' ' + this.description + '...');
|
||||
|
||||
spec.env.currentSpec = spec;
|
||||
spec.env.currentlyRunningTests = true;
|
||||
Reference in New Issue
Block a user