Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

museProtocol.test.ts

17 lines694 Bytes

1import { describe, expect, it } from "vite-plus/test";
2​
3import { museApprovalChoices } from "./museProtocol.ts";
4​
5// Muse 1.4.3 shell approvals offer only `abort`; the muse_permission replay covers that case.
6describe("Muse approval choices", () => {
7 it("keeps denied and abort separate when Muse offers both", () => {
8 const choices = museApprovalChoices({
9 availableChoices: [
10 { choiceId: "deny", label: "Deny", decision: "denied", scope: "once" },
11 { choiceId: "abort", label: "Stop", decision: "abort", scope: "once" },
12 ],
13 });
14 expect(choices.get("decline")?.choiceId).toBe("deny");
15 expect(choices.get("cancel")?.choiceId).toBe("abort");
16 });
17});