The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { describe, expect, it, vi } from "vite-plus/test"; |
| 2 | |
| 3 | import { resolveCloudPublicConfig } from "./publicConfig"; |
| 4 | |
| 5 | vi.mock("expo-constants", () => ({ |
| 6 | default: { |
| 7 | expoConfig: { |
| 8 | extra: {}, |
| 9 | }, |
| 10 | }, |
| 11 | })); |
| 12 | |
| 13 | describe("resolveCloudPublicConfig", () => { |
| 14 | it("rejects an insecure relay URL", () => { |
| 15 | expect( |
| 16 | resolveCloudPublicConfig({ |
| 17 | clerk: { publishableKey: "pk_test_example", jwtTemplate: "t3-relay" }, |
| 18 | relay: { url: "http://relay.example.test" }, |
| 19 | }), |
| 20 | ).toEqual({ |
| 21 | clerk: { |
| 22 | publishableKey: "pk_test_example", |
| 23 | jwtTemplate: "t3-relay", |
| 24 | }, |
| 25 | relay: { |
| 26 | url: null, |
| 27 | }, |
| 28 | observability: { |
| 29 | tracesUrl: null, |
| 30 | tracesDataset: null, |
| 31 | tracesToken: null, |
| 32 | }, |
| 33 | }); |
| 34 | }); |
| 35 | }); |