From 235efe52f1cfb3ab48622cadcc727e85b4f30e6e Mon Sep 17 00:00:00 2001 From: Steve Gravrock Date: Wed, 12 Feb 2020 16:55:40 -0800 Subject: [PATCH] Fixed test failure in IE --- spec/core/matchers/matchersUtilSpec.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) {