diff --git a/spec/core/matchers/matchersUtilSpec.js b/spec/core/matchers/matchersUtilSpec.js index 1be758d6..f06fe431 100644 --- a/spec/core/matchers/matchersUtilSpec.js +++ b/spec/core/matchers/matchersUtilSpec.js @@ -818,11 +818,16 @@ describe('matchersUtil', function() { Array.prototype, 'findIndex' ); - if (!findIndexDescriptor) { - return; - } beforeEach(function() { + if (!findIndexDescriptor) { + jasmine + .getEnv() + .pending( + 'Environment does not have a property descriptor for Array.prototype.findIndex' + ); + } + Object.defineProperty(Array.prototype, 'findIndex', { enumerable: true, value: function(predicate) {