feat: execute route and release recovery contracts
This commit is contained in:
@@ -72,7 +72,7 @@ describe("route registry", () => {
|
||||
"loadingSurface": "none",
|
||||
"navigationLabel": null,
|
||||
"navigationOrder": null,
|
||||
"paramsSchema": null,
|
||||
"paramsSchema": "NotFoundSplat",
|
||||
"path": "*",
|
||||
"routeId": "NOT_FOUND",
|
||||
"searchSchema": null,
|
||||
@@ -121,9 +121,12 @@ describe("route registry", () => {
|
||||
});
|
||||
|
||||
it("allows at most one automatic redirect per source-target pair", () => {
|
||||
const guard = createRedirectLoopGuard();
|
||||
const guard = createRedirectLoopGuard(2);
|
||||
expect(guard.allow("/private", "/signin")).toBe(true);
|
||||
expect(guard.allow("/private", "/signin")).toBe(false);
|
||||
expect(guard.allow("/signin", "/signin")).toBe(false);
|
||||
expect(guard.allow("/signin", "/continue")).toBe(true);
|
||||
expect(guard.allow("/continue", "/final")).toBe(false);
|
||||
expect(guard.hopCount).toBe(2);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user