@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 29 lines 1011 Bytes
Raw
1 import { describe, expect, it } from "vite-plus/test";
2
3 import { canShareWithGuest } from "./guestShareAvailability";
4
5 describe("mobile guest sharing availability", () => {
6 it("requires permission and the beta, and respects the environment's Connect policy", () => {
7 const enabled = { settings: { guestSharingEnabled: true } };
8 expect(canShareWithGuest(true, enabled)).toBe(true);
9 expect(canShareWithGuest(false, enabled)).toBe(false);
10 expect(canShareWithGuest(true, undefined)).toBe(false);
11 expect(canShareWithGuest(true, { settings: { guestSharingEnabled: false } })).toBe(false);
12 expect(
13 canShareWithGuest(true, {
14 ...enabled,
15 managedPolicy: {
16 organization: "Example",
17 lockedSettings: [],
18 limits: { connect: false },
19 },
20 }),
21 ).toBe(false);
22 expect(
23 canShareWithGuest(true, {
24 ...enabled,
25 managedPolicy: { organization: "Example", lockedSettings: [] },
26 }),
27 ).toBe(true);
28 });
29 });