Skip to content

Commit 94aaaa2

Browse files
committed
Assert parsed redirect state unconditionally
1 parent 137f1ff commit 94aaaa2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎e2e/cloud/auth-session.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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(
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
);

0 commit comments

Comments
 (0)