{"version":3,"file":"interactive-mode-btw.test.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode-btw.test.ts"],"names":[],"mappings":"","sourcesContent":["import { Container } from \"@apholdings/jensen-tui\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { InteractiveMode } from \"./interactive-mode.js\";\n\ndescribe(\"InteractiveMode /btw command\", () => {\n\tit(\"queues /btw guidance through the interactive command surface\", () => {\n\t\tconst mode = Object.assign(Object.create(InteractiveMode.prototype), {\n\t\t\tchatContainer: new Container(),\n\t\t\tshowWarning: vi.fn(),\n\t\t\tui: { requestRender: vi.fn() },\n\t\t\tsession: {\n\t\t\t\tpendingBtwNotes: [] as string[],\n\t\t\t\tqueueByTheWay(note: string) {\n\t\t\t\t\tthis.pendingBtwNotes.push(note);\n\t\t\t\t},\n\t\t\t\tgetPendingByTheWayNotes() {\n\t\t\t\t\treturn this.pendingBtwNotes;\n\t\t\t\t},\n\t\t\t},\n\t\t}) as unknown as {\n\t\t\thandleBtwCommand: (text: string) => void;\n\t\t\tchatContainer: Container;\n\t\t\tsession: { pendingBtwNotes: string[] };\n\t\t};\n\n\t\tmode.handleBtwCommand(\"/btw keep the next step narrow\");\n\t\texpect(mode.session.pendingBtwNotes).toEqual([\"keep the next step narrow\"]);\n\t\texpect(mode.chatContainer.children.at(-1)).toMatchObject({\n\t\t\ttext: expect.stringContaining(\"Queued by-the-way guidance for the next turn only (runtime-only).\"),\n\t\t});\n\n\t\tmode.handleBtwCommand(\"/btw mention the pending blocker\");\n\t\texpect(mode.session.pendingBtwNotes).toEqual([\"keep the next step narrow\", \"mention the pending blocker\"]);\n\t\texpect(mode.chatContainer.children.at(-1)).toMatchObject({\n\t\t\ttext: expect.stringContaining(\"Pending BTW notes: 2.\"),\n\t\t});\n\t});\n});\n"]}