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

protocol.test.ts

16 lines595 Bytes

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