(input?: {
leader?: string
leaderTimeout?: number
diff_style?: "auto" | "stacked"
bindings?: Partial<{
commandList: string[]
variantCycle: string[]
interrupt: string[]
historyPrevious: string[]
historyNext: string[]
inputClear: string[]
inputSubmit: string[]
inputNewline: string[]
}>
})
| 57 | } |
| 58 | |
| 59 | function config(input?: { |
| 60 | leader?: string |
| 61 | leaderTimeout?: number |
| 62 | diff_style?: "auto" | "stacked" |
| 63 | bindings?: Partial<{ |
| 64 | commandList: string[] |
| 65 | variantCycle: string[] |
| 66 | interrupt: string[] |
| 67 | historyPrevious: string[] |
| 68 | historyNext: string[] |
| 69 | inputClear: string[] |
| 70 | inputSubmit: string[] |
| 71 | inputNewline: string[] |
| 72 | }> |
| 73 | }): Resolved { |
| 74 | const bind = input?.bindings |
| 75 | return createTuiResolvedConfig({ |
| 76 | diff_style: input?.diff_style, |
| 77 | leader_timeout: input?.leaderTimeout, |
| 78 | keybinds: { |
| 79 | ...(input?.leader && { leader: input.leader }), |
| 80 | ...(bind?.commandList && { command_list: bind.commandList }), |
| 81 | ...(bind?.variantCycle && { variant_cycle: bind.variantCycle }), |
| 82 | ...(bind?.interrupt && { session_interrupt: bind.interrupt }), |
| 83 | ...(bind?.historyPrevious && { history_previous: bind.historyPrevious }), |
| 84 | ...(bind?.historyNext && { history_next: bind.historyNext }), |
| 85 | ...(bind?.inputClear && { input_clear: bind.inputClear }), |
| 86 | ...(bind?.inputSubmit && { input_submit: bind.inputSubmit }), |
| 87 | ...(bind?.inputNewline && { input_newline: bind.inputNewline }), |
| 88 | }, |
| 89 | }) |
| 90 | } |
| 91 | |
| 92 | describe("run runtime boot", () => { |
| 93 | afterEach(() => { |
no test coverage detected