| ... | ... | @@ -1,11 +1,7 @@ |
| 1 | 1 | import { afterEach, describe, expect, it, vi } from "vite-plus/test"; |
| 2 | 2 | import { EnvironmentId } from "@t3tools/contracts"; |
| 3 | 3 | |
| 4 | | import { |
| 5 | | isRelayManagedConnection, |
| 6 | | redactPairingCredential, |
| 7 | | toStableSavedRemoteConnection, |
| 8 | | } from "./connection"; |
| 4 | import { isRelayManagedConnection, toStableSavedRemoteConnection } from "./connection"; |
| 9 | 5 | import { authClientMetadata } from "./authClientMetadata"; |
| 10 | 6 | |
| 11 | 7 | const mobilePlatform = vi.hoisted(() => ({ OS: "ios" as "ios" | "android" })); |
| ... | ... | @@ -83,23 +79,6 @@ describe("mobile remote connection records", () => { |
| 83 | 79 | }); |
| 84 | 80 | }); |
| 85 | 81 | |
| 86 | | it("removes one-time bootstrap credentials before persisting pairing URLs", () => { |
| 87 | | expect(redactPairingCredential("https://desktop.example/#token=bootstrap-token")).toBe( |
| 88 | | "https://desktop.example/", |
| 89 | | ); |
| 90 | | expect(redactPairingCredential("https://desktop.example/?token=bootstrap-token")).toBe( |
| 91 | | "https://desktop.example/", |
| 92 | | ); |
| 93 | | }); |
| 94 | | |
| 95 | | it("removes hosted pairing credentials while keeping the advertised host", () => { |
| 96 | | expect( |
| 97 | | redactPairingCredential( |
| 98 | | "https://app.t3.codes/pair?host=https%3A%2F%2Fdesktop.example&token=bootstrap-token&label=Desktop", |
| 99 | | ), |
| 100 | | ).toBe("https://app.t3.codes/pair?host=https%3A%2F%2Fdesktop.example&label=Desktop"); |
| 101 | | }); |
| 102 | | |
| 103 | 82 | it("recognizes explicitly managed relay connections", () => { |
| 104 | 83 | expect(isRelayManagedConnection({ relayManaged: true })).toBe(true); |
| 105 | 84 | }); |