From ab671637da93598f69db5b45b9500156580d0f44 Mon Sep 17 00:00:00 2001 From: Pablo Ladreyt Date: Mon, 2 Jan 2023 15:35:04 -0300 Subject: [PATCH] Update regex --- test/string.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/string.spec.ts b/test/string.spec.ts index 604ec4fef2c..17c5cf60709 100644 --- a/test/string.spec.ts +++ b/test/string.spec.ts @@ -369,7 +369,7 @@ describe('string', () => { describe(`binary`, () => { it('generates a single binary character when no additional argument was provided', () => { const binary = faker.string.binary(); - expect(binary).toMatch(/^0x[01]*$/i); + expect(binary).toMatch(/^0x[01]$/i); expect(binary).toHaveLength(3); }); @@ -408,7 +408,7 @@ describe('string', () => { describe(`octal`, () => { it('generates single octal character when no additional argument was provided', () => { const octal = faker.string.octal(); - expect(octal).toMatch(/^0x[0-7]*$/i); + expect(octal).toMatch(/^0x[0-7]$/i); expect(octal).toHaveLength(3); });