repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bd0250
)
Add more tests for UUID validation
author
Jérôme Benoit
<jerome.benoit@sap.com>
Tue, 25 Oct 2022 23:36:24 +0000
(
01:36
+0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Tue, 25 Oct 2022 23:36:24 +0000
(
01:36
+0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
test/utils/UtilsTest.ts
patch
|
blob
|
blame
|
history
diff --git
a/test/utils/UtilsTest.ts
b/test/utils/UtilsTest.ts
index 9e882cc5e63a3dd4969bd86967acdb48a4e3e41f..5982e198e290312f4ac659a3510fc25cbb749c13 100644
(file)
--- 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()', () => {