From 97dbfa198644da98dc3f423acaaeb2976647e52b Mon Sep 17 00:00:00 2001 From: Eric Cheng Date: Wed, 7 Dec 2022 04:20:22 -0500 Subject: [PATCH] fix: broken `allowLeadingZeros` tests (#1638) --- test/random.spec.ts | 2 +- test/string.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/random.spec.ts b/test/random.spec.ts index 67a04c6d648..2ec6008da49 100644 --- a/test/random.spec.ts +++ b/test/random.spec.ts @@ -348,7 +348,7 @@ describe('random', () => { const actual = faker.random.numeric(); expect(actual).toHaveLength(1); - expect(actual).toMatch(/^[1-9]$/); + expect(actual).toMatch(/^[0-9]$/); }); it.each(times(100))( diff --git a/test/string.spec.ts b/test/string.spec.ts index f07f1e1664e..fe8235b03c2 100644 --- a/test/string.spec.ts +++ b/test/string.spec.ts @@ -424,7 +424,7 @@ describe('string', () => { expect(actual).toBeTypeOf('string'); expect(actual).toHaveLength(1000); - expect(actual).toMatch(/^[1-9][0-9]+$/); + expect(actual).toMatch(/^[0-9]+$/); }); it('should allow leading zeros via option', () => {