From 774c83a36e683d619c576f6e842d240efee6560c Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Sat, 14 May 2022 11:21:40 -0700 Subject: [PATCH] Don't report a deprecation when a runnable uses two forms of async This was made into an error in 4.0, so the deprecation is redundant (and broken). --- lib/jasmine-core/jasmine.js | 4 ---- src/core/QueueRunner.js | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index a0ba7a6b..83f53eb1 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -8138,8 +8138,6 @@ getJasmineRequireObj().QueueRunner = function(j$) { }; QueueRunner.prototype.diagnoseConflictingAsync_ = function(fn, retval) { - var msg; - if (retval && j$.isFunction_(retval.then)) { // Issue a warning that matches the user's code. // Omit the stack trace because there's almost certainly no user code @@ -8159,8 +8157,6 @@ getJasmineRequireObj().QueueRunner = function(j$) { 'function to not return a promise.' ); } - - this.deprecated(msg, { omitStackTrace: true }); } }; diff --git a/src/core/QueueRunner.js b/src/core/QueueRunner.js index 7896529b..4467552e 100644 --- a/src/core/QueueRunner.js +++ b/src/core/QueueRunner.js @@ -253,8 +253,6 @@ getJasmineRequireObj().QueueRunner = function(j$) { }; QueueRunner.prototype.diagnoseConflictingAsync_ = function(fn, retval) { - var msg; - if (retval && j$.isFunction_(retval.then)) { // Issue a warning that matches the user's code. // Omit the stack trace because there's almost certainly no user code @@ -274,8 +272,6 @@ getJasmineRequireObj().QueueRunner = function(j$) { 'function to not return a promise.' ); } - - this.deprecated(msg, { omitStackTrace: true }); } };