Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -0,0 +1,33 @@
import { beforeAll, describe, expect, it, vi } from "vitest";
vi.mock("@hivegrid/config", () => ({
loadRequiredWebConfig: () => ({
nodeEnv: "test",
routing: {},
sessionSecret: "test-session-secret-that-is-long-enough",
}),
resolveSessionCookiePolicy: () => ({
name: "app_analytics",
httpOnly: true,
path: "/",
sameSite: "lax",
secure: false,
}),
}));
let generateAnalyticsUserId: () => string;
beforeAll(async () => {
({ generateAnalyticsUserId } = await import("./analyticsCookie.server"));
});
describe("analytics identifier", () => {
it("uses a compact 128-bit base64url identifier", () => {
const first = generateAnalyticsUserId();
const second = generateAnalyticsUserId();
expect(first).toMatch(/^[A-Za-z0-9_-]{22}$/);
expect(Buffer.from(first, "base64url")).toHaveLength(16);
expect(second).not.toBe(first);
});
});