refactor: 리펙토링

This commit is contained in:
DongHyeonka
2026-08-01 19:39:59 +09:00
parent 9c959ea2a5
commit c6da03369c
171 changed files with 20329 additions and 782 deletions
+12
View File
@@ -28,6 +28,15 @@ describe("installed route registry", () => {
});
});
it("treats every non-public route as explicitly session-required", () => {
expect(ROUTE_REGISTRY.REFERENCE_RESOURCE_LIST.access).toBe(
"session-required",
);
expect(
decideRouteAccess("REFERENCE_RESOURCE_LIST", "unauthenticated"),
).toEqual({ allowed: false, action: "show-sign-in" });
});
it("bounds automatic redirects by pair and maximum hops", () => {
const guard = createRedirectLoopGuard(2);
expect(guard.allow("/private", "/signin")).toBe(true);
@@ -36,5 +45,8 @@ describe("installed route registry", () => {
expect(guard.allow("/signin", "/continue")).toBe(true);
expect(guard.allow("/continue", "/final")).toBe(false);
expect(guard.hopCount).toBe(2);
guard.reset();
expect(guard.allow("/unrelated", "/canonical-unrelated")).toBe(true);
});
});