jasmine.Env should always have a reporter now, no need to check.
This commit is contained in:
parent
a6aa9c652b
commit
0c24c2df2e
|
@ -1519,9 +1519,7 @@ jasmine.QueuedFunction.prototype.next = function() {
|
|||
};
|
||||
|
||||
jasmine.QueuedFunction.prototype.safeExecute = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...');
|
||||
}
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...');
|
||||
|
||||
try {
|
||||
this.func.apply(this.spec);
|
||||
|
@ -1626,9 +1624,7 @@ jasmine.Runner = function(env) {
|
|||
jasmine.util.inherit(jasmine.Runner, jasmine.ActionCollection);
|
||||
|
||||
jasmine.Runner.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
}
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
};
|
||||
|
||||
jasmine.Runner.prototype.getResults = function() {
|
||||
|
@ -1743,9 +1739,7 @@ jasmine.Spec.prototype.resetTimeout = function() {
|
|||
};
|
||||
|
||||
jasmine.Spec.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportSpecResults(this);
|
||||
}
|
||||
this.env.reporter.reportSpecResults(this);
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.finish = function() {
|
||||
|
@ -1873,9 +1867,7 @@ jasmine.Suite.prototype.getFullName = function() {
|
|||
};
|
||||
|
||||
jasmine.Suite.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportSuiteResults(this);
|
||||
}
|
||||
this.env.reporter.reportSuiteResults(this);
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
|
||||
|
|
|
@ -143,7 +143,7 @@ describe('Spies', function () {
|
|||
});
|
||||
|
||||
it('calls removeAllSpies during spec finish', function() {
|
||||
var test = new jasmine.Spec({}, {}, 'sample test');
|
||||
var test = new jasmine.Spec(new jasmine.Env(), {}, 'sample test');
|
||||
|
||||
this.spyOn(test, 'removeAllSpies');
|
||||
|
||||
|
|
|
@ -24,9 +24,7 @@ jasmine.QueuedFunction.prototype.next = function() {
|
|||
};
|
||||
|
||||
jasmine.QueuedFunction.prototype.safeExecute = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...');
|
||||
}
|
||||
this.env.reporter.log('>> Jasmine Running ' + this.spec.suite.description + ' ' + this.spec.description + '...');
|
||||
|
||||
try {
|
||||
this.func.apply(this.spec);
|
||||
|
|
|
@ -12,9 +12,7 @@ jasmine.Runner = function(env) {
|
|||
jasmine.util.inherit(jasmine.Runner, jasmine.ActionCollection);
|
||||
|
||||
jasmine.Runner.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
}
|
||||
this.env.reporter.reportRunnerResults(this);
|
||||
};
|
||||
|
||||
jasmine.Runner.prototype.getResults = function() {
|
||||
|
|
|
@ -103,9 +103,7 @@ jasmine.Spec.prototype.resetTimeout = function() {
|
|||
};
|
||||
|
||||
jasmine.Spec.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportSpecResults(this);
|
||||
}
|
||||
this.env.reporter.reportSpecResults(this);
|
||||
};
|
||||
|
||||
jasmine.Spec.prototype.finish = function() {
|
||||
|
|
|
@ -28,9 +28,7 @@ jasmine.Suite.prototype.getFullName = function() {
|
|||
};
|
||||
|
||||
jasmine.Suite.prototype.finishCallback = function() {
|
||||
if (this.env.reporter) {
|
||||
this.env.reporter.reportSuiteResults(this);
|
||||
}
|
||||
this.env.reporter.reportSuiteResults(this);
|
||||
};
|
||||
|
||||
jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
|
||||
|
|
Loading…
Reference in New Issue