From 63cc7cafc807f939eecf672f82aec1c625e139db Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Mon, 26 Feb 2018 17:57:37 -0800 Subject: [PATCH] Use Jasmine's arrayContains, instead of includes for better support --- lib/jasmine-core/jasmine.js | 6 +++--- src/core/ExceptionFormatter.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index 67ebb2a8..c5978a58 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -2513,7 +2513,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { function filterJasmine(stackTrace) { var result = [], jasmineMarker = stackTrace.style === 'webkit' ? '' : ' at '; - + stackTrace.frames.forEach(function(frame) { if (frame.file && frame.file !== jasmineFile) { result.push(frame.raw); @@ -2521,7 +2521,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { result.push(jasmineMarker); } }); - + return result; } @@ -2535,7 +2535,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { var empty = true; for (var prop in error) { - if (ignored.includes(prop)) { + if (j$.util.arrayContains(ignored, prop)) { continue; } result[prop] = error[prop]; diff --git a/src/core/ExceptionFormatter.js b/src/core/ExceptionFormatter.js index aa3a62ae..e69e6cd6 100644 --- a/src/core/ExceptionFormatter.js +++ b/src/core/ExceptionFormatter.js @@ -44,7 +44,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { function filterJasmine(stackTrace) { var result = [], jasmineMarker = stackTrace.style === 'webkit' ? '' : ' at '; - + stackTrace.frames.forEach(function(frame) { if (frame.file && frame.file !== jasmineFile) { result.push(frame.raw); @@ -52,7 +52,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { result.push(jasmineMarker); } }); - + return result; } @@ -66,7 +66,7 @@ getJasmineRequireObj().ExceptionFormatter = function(j$) { var empty = true; for (var prop in error) { - if (ignored.includes(prop)) { + if (j$.util.arrayContains(ignored, prop)) { continue; } result[prop] = error[prop];