Locally accepted: focused 214 tests, full 458-test suite, typecheck, client/server builds, Chrome five-Viewer cap2 proof, repository hygiene, and independent P0/P1 review. PR head had zero Actions runs.
19 lines
528 B
TypeScript
19 lines
528 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import {
|
|
relayCapacityMessageForBrowser,
|
|
} from "../src/client/media/relay-capability.ts";
|
|
|
|
describe("browser relay capability", () => {
|
|
it("allows two downstream edges on a peer-assisted Web viewer", () => {
|
|
expect(relayCapacityMessageForBrowser(true)).toEqual({
|
|
type: "relay-capacity",
|
|
downstreamEdges: 2,
|
|
});
|
|
});
|
|
|
|
it("does not create a relay message for ordinary P2P", () => {
|
|
expect(relayCapacityMessageForBrowser(false)).toBeNull();
|
|
});
|
|
});
|