1import { describe, expect, it } from "vite-plus/test";
2
3import { summarizeGitHubRouting } from "./GitHubRoutingSettings";
4
5describe("summarizeGitHubRouting", () => {
6 it("is empty when no machine shares", () => {
7 expect(summarizeGitHubRouting([{ label: "alvin", permission: "off" }])).toBeNull();
8 });
9
10 it("groups sharing machines by permission, read and act first", () => {
11 expect(
12 summarizeGitHubRouting([
13 { label: "alvin", permission: "read" },
14 { label: "bb-1", permission: "read-write" },
15 { label: "cup2", permission: "off" },
16 { label: "Theo's MacBook Pro", permission: "read-write" },
17 ]),
18 ).toBe("bb-1, Theo's MacBook Pro read and act · alvin read PRs");
19 });
20});