Check for syntax and standard library objects that don't work in IE

This commit is contained in:
Steve Gravrock
2020-07-01 17:28:45 -07:00
parent ba2aae63be
commit 4e2f703615
31 changed files with 159 additions and 125 deletions

View File

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