Add config option which stops jasmine from capturing exceptions in a test
This commit is contained in:
@@ -12,11 +12,16 @@ jasmine.Block = function(env, func, spec) {
|
||||
this.spec = spec;
|
||||
};
|
||||
|
||||
jasmine.Block.prototype.execute = function(onComplete) {
|
||||
try {
|
||||
jasmine.Block.prototype.execute = function(onComplete) {
|
||||
if (!jasmine.CATCH_EXCEPTIONS) {
|
||||
this.func.apply(this.spec);
|
||||
} catch (e) {
|
||||
this.spec.fail(e);
|
||||
}
|
||||
else {
|
||||
try {
|
||||
this.func.apply(this.spec);
|
||||
} catch (e) {
|
||||
this.spec.fail(e);
|
||||
}
|
||||
}
|
||||
onComplete();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user