style: revert to using var to minimise diff

This commit is contained in:
Tom French 2022-06-28 00:55:35 +01:00 committed by James Long
parent 6f9e51191d
commit 96e797dca4

View file

@ -24,7 +24,7 @@ describe('Timestamp', function() {
describe('parsing', function() { describe('parsing', function() {
it('should not parse', function() { it('should not parse', function() {
const invalidInputs = [ var invalidInputs = [
null, null,
undefined, undefined,
{}, {},
@ -40,19 +40,19 @@ describe('Timestamp', function() {
'9999-12-31T23:59:59.999Z-10000-FFFFFFFFFFFFFFFF', '9999-12-31T23:59:59.999Z-10000-FFFFFFFFFFFFFFFF',
'9999-12-31T23:59:59.999Z-FFFF-10000000000000000' '9999-12-31T23:59:59.999Z-FFFF-10000000000000000'
]; ];
for (const invalidInput of invalidInputs) { for (var invalidInput of invalidInputs) {
expect(Timestamp.parse(invalidInput)).toBe(null); expect(Timestamp.parse(invalidInput)).toBe(null);
} }
}); });
it('should parse', function() { it('should parse', function() {
const validInputs = [ var validInputs = [
'1970-01-01T00:00:00.000Z-0000-0000000000000000', '1970-01-01T00:00:00.000Z-0000-0000000000000000',
'2015-04-24T22:23:42.123Z-1000-0123456789ABCDEF', '2015-04-24T22:23:42.123Z-1000-0123456789ABCDEF',
'9999-12-31T23:59:59.999Z-FFFF-FFFFFFFFFFFFFFFF' '9999-12-31T23:59:59.999Z-FFFF-FFFFFFFFFFFFFFFF'
]; ];
for (const validInput of validInputs) { for (var validInput of validInputs) {
const parsed = Timestamp.parse(validInput); var parsed = Timestamp.parse(validInput);
expect(typeof parsed).toBe('object'); expect(typeof parsed).toBe('object');
expect(parsed.millis() >= 0).toBeTruthy(); expect(parsed.millis() >= 0).toBeTruthy();
expect(parsed.millis() < 253402300800000).toBeTruthy(); expect(parsed.millis() < 253402300800000).toBeTruthy();