Removed support for IE 10 and Safari 8

This commit is contained in:
Steve Gravrock
2021-04-22 19:16:06 -07:00
parent c2b558a2da
commit c2a714f168
25 changed files with 139 additions and 432 deletions

View File

@@ -30,27 +30,21 @@ describe('Any', function() {
});
it('matches a Map', function() {
jasmine.getEnv().requireFunctioningMaps();
var any = new jasmineUnderTest.Any(Map);
expect(any.asymmetricMatch(new Map())).toBe(true); // eslint-disable-line compat/compat
expect(any.asymmetricMatch(new Map())).toBe(true);
});
it('matches a Set', function() {
jasmine.getEnv().requireFunctioningSets();
var any = new jasmineUnderTest.Any(Set);
expect(any.asymmetricMatch(new Set())).toBe(true); // eslint-disable-line compat/compat
expect(any.asymmetricMatch(new Set())).toBe(true);
});
it('matches a TypedArray', function() {
jasmine.getEnv().requireFunctioningTypedArrays();
var any = new jasmineUnderTest.Any(Uint32Array);
var any = new jasmineUnderTest.Any(Uint32Array); // eslint-disable-line compat/compat
expect(any.asymmetricMatch(new Uint32Array([]))).toBe(true); // eslint-disable-line compat/compat
expect(any.asymmetricMatch(new Uint32Array([]))).toBe(true);
});
it('matches a Symbol', function() {

View File

@@ -24,27 +24,21 @@ describe('Anything', function() {
});
it('matches a Map', function() {
jasmine.getEnv().requireFunctioningMaps();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(new Map())).toBe(true); // eslint-disable-line compat/compat
expect(anything.asymmetricMatch(new Map())).toBe(true);
});
it('matches a Set', function() {
jasmine.getEnv().requireFunctioningSets();
var anything = new jasmineUnderTest.Anything();
expect(anything.asymmetricMatch(new Set())).toBe(true); // eslint-disable-line compat/compat
expect(anything.asymmetricMatch(new Set())).toBe(true);
});
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
expect(anything.asymmetricMatch(new Uint32Array([]))).toBe(true);
});
it('matches a Symbol', function() {

View File

@@ -22,30 +22,27 @@ describe('Empty', function() {
});
it('matches an empty map', function() {
jasmine.getEnv().requireFunctioningMaps();
var empty = new jasmineUnderTest.Empty();
var fullMap = new Map(); // eslint-disable-line compat/compat
var fullMap = new Map();
fullMap.set('thing', 2);
expect(empty.asymmetricMatch(new Map())).toBe(true); // eslint-disable-line compat/compat
expect(empty.asymmetricMatch(new Map())).toBe(true);
expect(empty.asymmetricMatch(fullMap)).toBe(false);
});
it('matches an empty set', function() {
jasmine.getEnv().requireFunctioningSets();
var empty = new jasmineUnderTest.Empty();
var fullSet = new Set(); // eslint-disable-line compat/compat
var fullSet = new Set();
fullSet.add(3);
expect(empty.asymmetricMatch(new Set())).toBe(true); // eslint-disable-line compat/compat
expect(empty.asymmetricMatch(new Set())).toBe(true);
expect(empty.asymmetricMatch(fullSet)).toBe(false);
});
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
expect(empty.asymmetricMatch(new Int16Array([1, 2]))).toBe(false); // eslint-disable-line compat/compat
expect(empty.asymmetricMatch(new Int16Array())).toBe(true);
expect(empty.asymmetricMatch(new Int16Array([1, 2]))).toBe(false);
});
});

View File

@@ -1,4 +1,3 @@
/* eslint-disable compat/compat */
describe('MapContaining', function() {
function MapI(iterable) {
// for IE11
@@ -9,10 +8,6 @@ describe('MapContaining', function() {
return map;
}
beforeEach(function() {
jasmine.getEnv().requireFunctioningMaps();
});
it('matches any actual map to an empty map', function() {
var actualMap = new MapI([['foo', 'bar']]);
var containing = new jasmineUnderTest.MapContaining(new Map());

View File

@@ -22,32 +22,29 @@ describe('NotEmpty', function() {
});
it('matches a non empty map', function() {
jasmine.getEnv().requireFunctioningMaps();
var notEmpty = new jasmineUnderTest.NotEmpty();
var fullMap = new Map(); // eslint-disable-line compat/compat
var fullMap = new Map();
fullMap.set('one', 1);
var emptyMap = new Map(); // eslint-disable-line compat/compat
var emptyMap = new Map();
expect(notEmpty.asymmetricMatch(fullMap)).toBe(true);
expect(notEmpty.asymmetricMatch(emptyMap)).toBe(false);
});
it('matches a non empty set', function() {
jasmine.getEnv().requireFunctioningSets();
var notEmpty = new jasmineUnderTest.NotEmpty();
var filledSet = new Set(); // eslint-disable-line compat/compat
var filledSet = new Set();
filledSet.add(1);
var emptySet = new Set(); // eslint-disable-line compat/compat
var emptySet = new Set();
expect(notEmpty.asymmetricMatch(filledSet)).toBe(true);
expect(notEmpty.asymmetricMatch(emptySet)).toBe(false);
});
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
expect(notEmpty.asymmetricMatch(new Int16Array())).toBe(false); // eslint-disable-line compat/compat
expect(notEmpty.asymmetricMatch(new Int16Array([1, 2, 3]))).toBe(true);
expect(notEmpty.asymmetricMatch(new Int16Array())).toBe(false);
});
});

View File

@@ -1,4 +1,3 @@
/* eslint-disable compat/compat */
describe('SetContaining', function() {
function SetI(iterable) {
// for IE11
@@ -9,10 +8,6 @@ describe('SetContaining', function() {
return set;
}
beforeEach(function() {
jasmine.getEnv().requireFunctioningSets();
});
it('matches any actual set to an empty set', function() {
var actualSet = new SetI(['foo', 'bar']);
var containing = new jasmineUnderTest.SetContaining(new Set());