mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import UUID from "../../Utils/UUID";
|
|
|
|
describe("UUID", () => {
|
|
test("UUID.generate() should generate a valid UUID", () => {
|
|
const uuid: string = UUID.generate();
|
|
expect(uuid).toBeDefined();
|
|
expect(uuid).toMatch(
|
|
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,
|
|
);
|
|
expect(uuid.length).toBe(36);
|
|
});
|
|
});
|