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

View File

@@ -1,20 +1,20 @@
describe('Empty', function() {
it('matches an empty object', function() {
var empty = new jasmineUnderTest.Empty();
const empty = new jasmineUnderTest.Empty();
expect(empty.asymmetricMatch({})).toBe(true);
expect(empty.asymmetricMatch({ undefined: false })).toBe(false);
});
it('matches an empty array', function() {
var empty = new jasmineUnderTest.Empty();
const empty = new jasmineUnderTest.Empty();
expect(empty.asymmetricMatch([])).toBe(true);
expect(empty.asymmetricMatch([1, 12, 3])).toBe(false);
});
it('matches an empty string', function() {
var empty = new jasmineUnderTest.Empty();
const empty = new jasmineUnderTest.Empty();
expect(empty.asymmetricMatch('')).toBe(true);
expect(empty.asymmetricMatch('')).toBe(true);
@@ -22,8 +22,8 @@ describe('Empty', function() {
});
it('matches an empty map', function() {
var empty = new jasmineUnderTest.Empty();
var fullMap = new Map();
const empty = new jasmineUnderTest.Empty();
const fullMap = new Map();
fullMap.set('thing', 2);
expect(empty.asymmetricMatch(new Map())).toBe(true);
@@ -31,8 +31,8 @@ describe('Empty', function() {
});
it('matches an empty set', function() {
var empty = new jasmineUnderTest.Empty();
var fullSet = new Set();
const empty = new jasmineUnderTest.Empty();
const fullSet = new Set();
fullSet.add(3);
expect(empty.asymmetricMatch(new Set())).toBe(true);
@@ -40,7 +40,7 @@ describe('Empty', function() {
});
it('matches an empty typed array', function() {
var empty = new jasmineUnderTest.Empty();
const empty = new jasmineUnderTest.Empty();
expect(empty.asymmetricMatch(new Int16Array())).toBe(true);
expect(empty.asymmetricMatch(new Int16Array([1, 2]))).toBe(false);