| author | |
| committer | |
| log | ee150e178be5e0484a588a8fe7ad98fd6b858973 |
| tree | 5a70c51dbd3d92c41af08c060639ac447eb6384c |
| parent | 0acf05f4f561b873853587f8629ca691b18a613a |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 0 insertions(+), 16 deletions(-)
apps/mobile/src/features/cloud/linkEnvironment.test.ts-8| ... | ... | @@ -17,7 +17,6 @@ import { |
| 17 | 17 | connectCloudEnvironment, |
| 18 | 18 | listCloudEnvironments, |
| 19 | 19 | listCloudEnvironmentsWithStatus, |
| 20 | normalizeRelayBaseUrl, | |
| 21 | 20 | refreshCloudEnvironmentConnection, |
| 22 | 21 | } from "./linkEnvironment"; |
| 23 | 22 | |
| ... | ... | @@ -195,13 +194,6 @@ describe("mobile cloud link environment client", () => { |
| 195 | 194 | loadPreferences.mockClear(); |
| 196 | 195 | }); |
| 197 | 196 | |
| 198 | it("normalizes configured relay base URLs before building DPoP-bound requests", () => { | |
| 199 | expect(normalizeRelayBaseUrl(" https://relay.example.test/// ")).toBe( | |
| 200 | "https://relay.example.test", | |
| 201 | ); | |
| 202 | expect(normalizeRelayBaseUrl(" ")).toBeNull(); | |
| 203 | }); | |
| 204 | ||
| 205 | 197 | it("makes linked environments visible while their status is still loading", () => { |
| 206 | 198 | expect(cloudEnvironmentsPendingStatus([listedEnvironment("env-1")])).toMatchObject([ |
| 207 | 199 | { |
apps/mobile/src/features/cloud/linkEnvironment.ts-8| ... | ... | @@ -43,14 +43,6 @@ const RELAY_STATUS_AND_CONNECT_SCOPES = [ |
| 43 | 43 | RelayEnvironmentConnectScope, |
| 44 | 44 | ] satisfies ReadonlyArray<RelayDpopAccessTokenScope>; |
| 45 | 45 | |
| 46 | export function normalizeRelayBaseUrl(value: string | null | undefined): string | null { | |
| 47 | const trimmed = value?.trim(); | |
| 48 | if (!trimmed) { | |
| 49 | return null; | |
| 50 | } | |
| 51 | return trimmed.replace(/\/+$/g, ""); | |
| 52 | } | |
| 53 | ||
| 54 | 46 | function readRelayUrl(): string | null { |
| 55 | 47 | return resolveCloudPublicConfig().relay.url; |
| 56 | 48 | } |