Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

@@ -0,0 +1,15 @@
import { describe, expect, it } from "vitest";
import { redactAnalyticsCookie, redactAnalyticsUrl } from "./analytics-redaction";
describe("analytics redaction", () => {
it("removes query strings from absolute and relative URLs", () => {
expect(redactAnalyticsUrl("https://example.com/path?token=secret&email=a@example.com#section")).toBe("https://example.com/path#section");
expect(redactAnalyticsUrl("/checkout?session_id=secret")).toBe("/checkout");
});
it("does not expose raw visitor cookies", () => {
expect(redactAnalyticsCookie("abcdef123456")).toBe("abcde...");
expect(redactAnalyticsCookie("abc")).toBe("[redacted]");
});
});