diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index 20d10da1156..54a9210897a 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -203,9 +203,7 @@ describe('finance', () => { }); it('should set a specified length', () => { - let expected = faker.number.int(20); - - expected ||= 4; + const expected = faker.number.int(20) || 4; const mask = faker.finance.mask(expected, false, false); // the length of mask picks 4 if the random number generator picks 0 @@ -237,9 +235,7 @@ describe('finance', () => { }); it('should set a specified length', () => { - let expected = faker.number.int(20); - - expected ||= 4; + const expected = faker.number.int(20) || 4; const mask = faker.finance.maskedNumber({ length: expected,