From: Jérôme Benoit Date: Tue, 25 Oct 2022 23:36:24 +0000 (+0200) Subject: Add more tests for UUID validation X-Git-Tag: v1.1.86~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=96642078c6b041716ada8cb721ac1abb8221f48d;p=e-mobility-charging-stations-simulator.git Add more tests for UUID validation Signed-off-by: Jérôme Benoit --- 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()', () => {