Removed support for custom promise libraries

All supported platforms now provide promises, so there's no longer a need
for Jasmine to be able to create them via a user-provided library. Jasmine
can still consume non-native promises but will always use the built-in
Promise object to create promises.

[#179078103]
This commit is contained in:
Steve Gravrock
2021-08-30 19:07:26 -07:00
parent 37b9f8e420
commit d61800c5c8
8 changed files with 22 additions and 237 deletions
+2 -9
View File
@@ -19,13 +19,7 @@ getJasmineRequireObj().Spy = function(j$) {
* @class Spy
* @hideconstructor
*/
function Spy(
name,
originalFn,
customStrategies,
defaultStrategyFn,
getPromise
) {
function Spy(name, originalFn, customStrategies, defaultStrategyFn) {
var numArgs = typeof originalFn === 'function' ? originalFn.length : 0,
wrapper = makeFunc(numArgs, function(context, args, invokeNew) {
return spy(context, args, invokeNew);
@@ -36,8 +30,7 @@ getJasmineRequireObj().Spy = function(j$) {
getSpy: function() {
return wrapper;
},
customStrategies: customStrategies,
getPromise: getPromise
customStrategies: customStrategies
}),
callTracker = new j$.CallTracker(),
spy = function(context, args, invokeNew) {