diff --git a/spec/core/asymmetric_equality/AnySpec.js b/spec/core/asymmetric_equality/AnySpec.js index 0903cf84..4db56f3b 100644 --- a/spec/core/asymmetric_equality/AnySpec.js +++ b/spec/core/asymmetric_equality/AnySpec.js @@ -46,9 +46,7 @@ describe('Any', function() { }); it('matches a TypedArray', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); - - var any = new jasmineUnderTest.Any(Uint32Array); // eslint-disable-line compat/compat + var any = new jasmineUnderTest.Any(Uint32Array); expect(any.asymmetricMatch(new Uint32Array([]))).toBe(true); // eslint-disable-line compat/compat }); diff --git a/spec/core/asymmetric_equality/AnythingSpec.js b/spec/core/asymmetric_equality/AnythingSpec.js index 61ac14e5..1463c1a8 100644 --- a/spec/core/asymmetric_equality/AnythingSpec.js +++ b/spec/core/asymmetric_equality/AnythingSpec.js @@ -40,8 +40,6 @@ describe('Anything', function() { }); it('matches a TypedArray', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); - var anything = new jasmineUnderTest.Anything(); expect(anything.asymmetricMatch(new Uint32Array([]))).toBe(true); // eslint-disable-line compat/compat diff --git a/spec/core/asymmetric_equality/EmptySpec.js b/spec/core/asymmetric_equality/EmptySpec.js index 4ef48a86..03d822be 100644 --- a/spec/core/asymmetric_equality/EmptySpec.js +++ b/spec/core/asymmetric_equality/EmptySpec.js @@ -42,7 +42,6 @@ describe('Empty', function() { }); it('matches an empty typed array', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); var empty = new jasmineUnderTest.Empty(); expect(empty.asymmetricMatch(new Int16Array())).toBe(true); // eslint-disable-line compat/compat diff --git a/spec/core/asymmetric_equality/NotEmptySpec.js b/spec/core/asymmetric_equality/NotEmptySpec.js index fdb0a99e..82bcf014 100644 --- a/spec/core/asymmetric_equality/NotEmptySpec.js +++ b/spec/core/asymmetric_equality/NotEmptySpec.js @@ -44,7 +44,6 @@ describe('NotEmpty', function() { }); it('matches a non empty typed array', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); var notEmpty = new jasmineUnderTest.NotEmpty(); expect(notEmpty.asymmetricMatch(new Int16Array([1, 2, 3]))).toBe(true); // eslint-disable-line compat/compat diff --git a/spec/core/matchers/matchersUtilSpec.js b/spec/core/matchers/matchersUtilSpec.js index 627deddc..369f6b5a 100644 --- a/spec/core/matchers/matchersUtilSpec.js +++ b/spec/core/matchers/matchersUtilSpec.js @@ -893,7 +893,6 @@ describe('matchersUtil', function() { }); it('fails for ArrayBuffers with same length but different content', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); jasmine.getEnv().requireFunctioningArrayBuffers(); var buffer1 = new ArrayBuffer(4); // eslint-disable-line compat/compat var buffer2 = new ArrayBuffer(4); // eslint-disable-line compat/compat @@ -906,7 +905,6 @@ describe('matchersUtil', function() { describe('Typed arrays', function() { it('fails for typed arrays of same length and contents but different types', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); // eslint-disable-next-line compat/compat var a1 = new Int8Array(1); // eslint-disable-next-line compat/compat diff --git a/spec/core/matchers/toEqualSpec.js b/spec/core/matchers/toEqualSpec.js index b2fb9f9c..06a4f982 100644 --- a/spec/core/matchers/toEqualSpec.js +++ b/spec/core/matchers/toEqualSpec.js @@ -257,8 +257,6 @@ describe('toEqual', function() { }); it('reports mismatches between arrays of different types', function() { - jasmine.getEnv().requireFunctioningTypedArrays(); - var actual = new Uint32Array([1, 2, 3]), // eslint-disable-line compat/compat expected = new Uint16Array([1, 2, 3]), // eslint-disable-line compat/compat message = diff --git a/spec/helpers/checkForArrayBuffer.js b/spec/helpers/checkForArrayBuffer.js index a04a94e9..bf49a531 100644 --- a/spec/helpers/checkForArrayBuffer.js +++ b/spec/helpers/checkForArrayBuffer.js @@ -17,7 +17,6 @@ } env.requireFunctioningArrayBuffers = function() { - env.requireFunctioningTypedArrays(); if (!hasFunctioningArrayBuffers()) { env.pending('Browser has incomplete or missing support for ArrayBuffer'); } diff --git a/spec/helpers/checkForTypedArrays.js b/spec/helpers/checkForTypedArrays.js deleted file mode 100644 index 6902120b..00000000 --- a/spec/helpers/checkForTypedArrays.js +++ /dev/null @@ -1,24 +0,0 @@ -/* eslint-disable compat/compat */ -(function(env) { - function hasFunctioningTypedArrays() { - if (typeof Uint32Array === 'undefined') { - return false; - } - - try { - var a = new Uint32Array([1, 2, 3]); - if (a.length !== 3) { - return false; - } - return true; - } catch (e) { - return false; - } - } - - env.requireFunctioningTypedArrays = function() { - if (!hasFunctioningTypedArrays()) { - env.pending('Browser has incomplete or missing support for typed arrays'); - } - }; -})(jasmine.getEnv()); diff --git a/spec/support/jasmine-browser.js b/spec/support/jasmine-browser.js index 59560423..4d52f913 100644 --- a/spec/support/jasmine-browser.js +++ b/spec/support/jasmine-browser.js @@ -24,7 +24,6 @@ module.exports = { 'helpers/checkForMap.js', 'helpers/checkForSet.js', 'helpers/checkForSymbol.js', - 'helpers/checkForTypedArrays.js', 'helpers/checkForUrl.js', 'helpers/domHelpers.js', 'helpers/integrationMatchers.js', diff --git a/spec/support/jasmine.json b/spec/support/jasmine.json index b9985275..f87d05dd 100644 --- a/spec/support/jasmine.json +++ b/spec/support/jasmine.json @@ -11,7 +11,6 @@ "helpers/checkForMap.js", "helpers/checkForSet.js", "helpers/checkForSymbol.js", - "helpers/checkForTypedArrays.js", "helpers/checkForUrl.js", "helpers/domHelpers.js", "helpers/integrationMatchers.js",