@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 12 lines 599 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { deriveWsBaseUrl, normalizeHttpBaseUrl } from "./endpoint.ts";
4
5 describe("advertised endpoint helpers", () => {
6 it("normalizes HTTP and WebSocket base URLs", () => {
7 expect(normalizeHttpBaseUrl("https://example.com/path?x=1#hash")).toBe("https://example.com/");
8 expect(normalizeHttpBaseUrl("wss://example.com/socket")).toBe("https://example.com/");
9 expect(deriveWsBaseUrl("https://example.com/api")).toBe("wss://example.com/");
10 expect(deriveWsBaseUrl("http://127.0.0.1:3773")).toBe("ws://127.0.0.1:3773/");
11 });
12 });