Skip to content

Commit

Permalink
Only show deprecation for catch exceptions if you tell Jasmine not to…
Browse files Browse the repository at this point in the history
… catch

- Fixes #1497
  • Loading branch information
Gregg Van Hove committed Feb 7, 2018
1 parent 4530f94 commit fbec3cc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion lib/jasmine-core/jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
2 changes: 1 addition & 1 deletion lib/jasmine-core/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
#
module Jasmine
module Core
VERSION = "2.99.0"
VERSION = "2.99.1"
end
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 3 additions & 1 deletion src/core/Env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down

0 comments on commit fbec3cc

Please sign in to comment.