Only show deprecation for catch exceptions if you tell Jasmine not to catch

- Fixes #1497
This commit is contained in:
Gregg Van Hove
2018-02-07 14:47:10 -08:00
parent 4530f9431f
commit fbec3cc230
4 changed files with 8 additions and 4 deletions

View File

@@ -903,8 +903,10 @@ getJasmineRequireObj().Env = function(j$) {
// TODO: fix this naming, and here's where the value comes in
this.catchExceptions = function(value) {
this.deprecated('The catchExceptions option is deprecated and will be replaced with stopOnSpecFailure in Jasmine 3.0');
catchExceptions = !!value;
if (!catchExceptions) {
this.deprecated('The catchExceptions option is deprecated and will be replaced with stopOnSpecFailure in Jasmine 3.0');
}
return catchExceptions;
};

View File

@@ -4,6 +4,6 @@
#
module Jasmine
module Core
VERSION = "2.99.0"
VERSION = "2.99.1"
end
end

View File

@@ -1,7 +1,7 @@
{
"name": "jasmine-core",
"license": "MIT",
"version": "2.99.0",
"version": "2.99.1",
"repository": {
"type": "git",
"url": "https://github.com/jasmine/jasmine.git"

View File

@@ -198,8 +198,10 @@ getJasmineRequireObj().Env = function(j$) {
// TODO: fix this naming, and here's where the value comes in
this.catchExceptions = function(value) {
this.deprecated('The catchExceptions option is deprecated and will be replaced with stopOnSpecFailure in Jasmine 3.0');
catchExceptions = !!value;
if (!catchExceptions) {
this.deprecated('The catchExceptions option is deprecated and will be replaced with stopOnSpecFailure in Jasmine 3.0');
}
return catchExceptions;
};