| 3 | import type { FooterApi, FooterEvent, StreamCommit } from "@/cli/cmd/run/types" |
| 4 | |
| 5 | function footer() { |
| 6 | const events: FooterEvent[] = [] |
| 7 | const commits: StreamCommit[] = [] |
| 8 | |
| 9 | const api: FooterApi = { |
| 10 | isClosed: false, |
| 11 | onPrompt: () => () => {}, |
| 12 | onQueuedRemove: () => () => {}, |
| 13 | onClose: () => () => {}, |
| 14 | event: (next) => { |
| 15 | events.push(next) |
| 16 | }, |
| 17 | append: (next) => { |
| 18 | commits.push(next) |
| 19 | }, |
| 20 | idle: () => Promise.resolve(), |
| 21 | close: () => {}, |
| 22 | destroy: () => {}, |
| 23 | } |
| 24 | |
| 25 | return { api, events, commits } |
| 26 | } |
| 27 | |
| 28 | describe("run stream bridge", () => { |
| 29 | test("defaults status patches to running phase", () => { |