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

composerSendPresentation.test.ts

27 lines771 Bytes

1import { describe, expect, it } from "vite-plus/test";
2​
3import { resolveComposerSendPresentation } from "./composerSendPresentation";
4​
5const idle = {
6 editingQueuedMessage: false,
7 running: false,
8 canSteer: false,
9 followUpBehavior: "queue",
10 deliveryDeferred: false,
11} as const;
12​
13describe("resolveComposerSendPresentation", () => {
14 it("never promises steering the provider cannot do", () => {
15 const presentation = resolveComposerSendPresentation({
16 ...idle,
17 running: true,
18 canSteer: false,
19 followUpBehavior: "steer",
20 });
21​
22 expect(presentation.label).toBe("Queue");
23 expect(presentation.action).toBe("queue");
24 expect(presentation.alternate).toBeNull();
25 expect(presentation.offersFollowUpChoice).toBe(false);
26 });
27});