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