|
1 | 1 | import { describe, expect, it } from "vite-plus/test"; |
2 | 2 |
|
3 | | -import { resolveClerkAuthRedirectUrl } from "./authRedirect"; |
| 3 | +import { resolveClerkSignInProps } from "./authRedirect"; |
4 | 4 |
|
5 | | -describe("resolveClerkAuthRedirectUrl", () => { |
6 | | - it("preserves the current browser URL", () => { |
| 5 | +describe("resolveClerkSignInProps", () => { |
| 6 | + it("returns to the current browser URL on the web", () => { |
7 | 7 | const href = "https://app.t3.codes/connect?state=state-1#details"; |
8 | | - expect(resolveClerkAuthRedirectUrl(href, false)).toBe(href); |
| 8 | + expect(resolveClerkSignInProps(href, false)).toEqual({ forceRedirectUrl: href }); |
9 | 9 | }); |
10 | 10 |
|
11 | | - it("uses the allowlisted packaged desktop callback", () => { |
12 | | - expect(resolveClerkAuthRedirectUrl("t3code://app/continue#/settings/general", true)).toBe( |
13 | | - "t3code://app/", |
14 | | - ); |
| 11 | + it("omits the redirect override on packaged desktop", () => { |
| 12 | + expect(resolveClerkSignInProps("t3code://app/#/settings/general", true)).toEqual({}); |
15 | 13 | }); |
16 | 14 |
|
17 | | - it("uses the allowlisted development desktop callback", () => { |
18 | | - expect(resolveClerkAuthRedirectUrl("t3code-dev://app/continue#/settings/general", true)).toBe( |
19 | | - "t3code-dev://app/", |
20 | | - ); |
| 15 | + it("omits the redirect override on development desktop", () => { |
| 16 | + expect(resolveClerkSignInProps("t3code-dev://app/#/settings/general", true)).toEqual({}); |
21 | 17 | }); |
22 | 18 | }); |
0 commit comments