From 96642078c6b041716ada8cb721ac1abb8221f48d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 26 Oct 2022 01:36:24 +0200 Subject: [PATCH 1/1] Add more tests for UUID validation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- test/utils/UtilsTest.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/utils/UtilsTest.ts b/test/utils/UtilsTest.ts index 9e882cc5..5982e198 100644 --- a/test/utils/UtilsTest.ts +++ b/test/utils/UtilsTest.ts @@ -7,6 +7,9 @@ describe('Utils test suite', () => { const uuid = Utils.generateUUID(); expect(uuid.length).toEqual(36); expect(Utils.validateUUID(uuid)).toBe(true); + expect(Utils.validateUUID('abcdef00-0000-4000-0000-000000000000')).toBe(true); + expect(Utils.validateUUID('')).toBe(false); + expect(Utils.validateUUID('987FBC9-4BED-3078-CF07A-9141BA07C9F3')).toBe(false); }); it('Verify secureRandom()', () => { -- 2.34.1