Новый сервис pcp-tgu-ui-service: ТГУ-фронт на headless-auth nstart + платформенный CI/деплой

This commit is contained in:
Дмитрий Соловьев
2026-06-09 13:35:13 +03:00
parent 0b617594fd
commit 505bf1f31c
129 changed files with 21640 additions and 0 deletions
@@ -0,0 +1,20 @@
import { describe, expect, it } from "vitest";
import { generateUuid, uuidV4Fallback } from "./uuid";
const UUID_V4 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
describe("generateUuid", () => {
it("возвращает валидный UUID v4", () => {
expect(generateUuid()).toMatch(UUID_V4);
});
});
describe("uuidV4Fallback (insecure context)", () => {
it("даёт валидный UUID v4 без crypto.randomUUID", () => {
expect(uuidV4Fallback()).toMatch(UUID_V4);
});
it("генерирует разные значения", () => {
expect(uuidV4Fallback()).not.toBe(uuidV4Fallback());
});
});