History

Assert parsed redirect state unconditionally

Rhys Sullivan committed 1 month ago

Commit 94aaaa21 parent 137f1ff1 file · +2 −2Browse files

Unified · Split

e2e/cloud/auth-session.test.ts+2−2
@@ -5,7 +5,7 @@ · 4 unmodified lines
55 // callback refusing forged/incomplete redirects, the sealed-session cookie
66 // actually authorizing the session API, and logout dropping the cookie.
77 import { expect } from "@effect/vitest";
8−import { Effect, Encoding, Result, Schema } from "effect";
8+import { Effect, Encoding, Option, Result, Schema } from "effect";
99
1010 import { scenario } from "../src/scenario";
1111 import { Api, Target } from "../src/services";
@@ -85,7 +85,7 @@ scenario( · 73 unmodified lines
8585 Result.getOrElse(Encoding.decodeBase64UrlString(state), () => ""),
8686 );
8787 expect(decoded._tag).toBe("Some");
88− if (decoded._tag === "Some") expect(decoded.value.returnTo).toBeUndefined();
88+ expect(Option.getOrThrow(decoded).returnTo).toBeUndefined();
8989 }
9090 }),
9191 );