Gateway: status route with per-route results, test push, reconnect and unpair
This commit is contained in:
1 parent
e6fd2b8f51
commit
9707daf1fe
9 files changed
+398
-55
No files matched your search
@@ -2,7 +2,7 @@ import { describe, expect, it } from "bun:test";
|
||||
|
||||
import type { BoundedThread, ThreadShell } from "../src/t3/types.ts";
|
||||
import type { T3Host } from "../src/t3/host.ts";
|
||||
import { buildSummary, summarize, trimText } from "../src/views.ts";
|
||||
import { buildSummary, routeKind, summarize, trimText } from "../src/views.ts";
|
||||
|
||||
const thread = (overrides: Partial<ThreadShell> = {}): ThreadShell => ({
|
||||
id: "thread-1",
|
||||
@@ -129,3 +129,12 @@ describe("buildSummary", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("routeKind", () => {
|
||||
it("tells direct, VPN and public routes apart", () => {
|
||||
expect(routeKind("http://desktop.gib:3773")).toBe("direct");
|
||||
expect(routeKind("http://192.168.2.2:3773")).toBe("direct");
|
||||
expect(routeKind("http://laptopvpn.gib:3773")).toBe("vpn");
|
||||
expect(routeKind("https://t3laptopvpn.gbrown.org")).toBe("public");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user