Fixed test failure in IE
This commit is contained in:
committed by
Steve Gravrock
parent
1e8619df88
commit
235efe52f1
@@ -818,11 +818,16 @@ describe('matchersUtil', function() {
|
|||||||
Array.prototype,
|
Array.prototype,
|
||||||
'findIndex'
|
'findIndex'
|
||||||
);
|
);
|
||||||
if (!findIndexDescriptor) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
|
if (!findIndexDescriptor) {
|
||||||
|
jasmine
|
||||||
|
.getEnv()
|
||||||
|
.pending(
|
||||||
|
'Environment does not have a property descriptor for Array.prototype.findIndex'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
Object.defineProperty(Array.prototype, 'findIndex', {
|
Object.defineProperty(Array.prototype, 'findIndex', {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
value: function(predicate) {
|
value: function(predicate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user