Use const/let in specs, not var

This commit is contained in:
Steve Gravrock
2022-04-16 13:41:44 -07:00
parent 482dc883eb
commit 1166d10e43
111 changed files with 2522 additions and 2675 deletions
+10 -10
View File
@@ -1,20 +1,20 @@
describe('NotEmpty', function() {
it('matches a non empty object', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
const notEmpty = new jasmineUnderTest.NotEmpty();
expect(notEmpty.asymmetricMatch({ undefined: false })).toBe(true);
expect(notEmpty.asymmetricMatch({})).toBe(false);
});
it('matches a non empty array', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
const notEmpty = new jasmineUnderTest.NotEmpty();
expect(notEmpty.asymmetricMatch([1, 12, 3])).toBe(true);
expect(notEmpty.asymmetricMatch([])).toBe(false);
});
it('matches a non empty string', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
const notEmpty = new jasmineUnderTest.NotEmpty();
expect(notEmpty.asymmetricMatch('12312')).toBe(true);
expect(notEmpty.asymmetricMatch('')).toBe(false);
@@ -22,27 +22,27 @@ describe('NotEmpty', function() {
});
it('matches a non empty map', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
var fullMap = new Map();
const notEmpty = new jasmineUnderTest.NotEmpty();
const fullMap = new Map();
fullMap.set('one', 1);
var emptyMap = new Map();
const emptyMap = new Map();
expect(notEmpty.asymmetricMatch(fullMap)).toBe(true);
expect(notEmpty.asymmetricMatch(emptyMap)).toBe(false);
});
it('matches a non empty set', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
var filledSet = new Set();
const notEmpty = new jasmineUnderTest.NotEmpty();
const filledSet = new Set();
filledSet.add(1);
var emptySet = new Set();
const emptySet = new Set();
expect(notEmpty.asymmetricMatch(filledSet)).toBe(true);
expect(notEmpty.asymmetricMatch(emptySet)).toBe(false);
});
it('matches a non empty typed array', function() {
var notEmpty = new jasmineUnderTest.NotEmpty();
const notEmpty = new jasmineUnderTest.NotEmpty();
expect(notEmpty.asymmetricMatch(new Int16Array([1, 2, 3]))).toBe(true);
expect(notEmpty.asymmetricMatch(new Int16Array())).toBe(false);