* What the picker offers, in the order drawn, over a fresh drawing: * inRepository answers `ui.invalidate`, so none comes by itself.
(ui: Mounted<'terminal', 'Pane'>)
| 45 | * inRepository answers `ui.invalidate`, so none comes by itself. |
| 46 | */ |
| 47 | async function pickerOf(ui: Mounted<'terminal', 'Pane'>) { |
| 48 | await ui.redraw() |
| 49 | |
| 50 | const props = (await ui.find({ key: 'source' }))?.props ?? {} |
| 51 | const options = arrayOf(props.options).filter(isRecord) |
| 52 | |
| 53 | return { |
| 54 | title: props.label, |
| 55 | picked: props.value, |
| 56 | labels: options.map(option => option.label), |
| 57 | values: options.map(option => String(option.value)), |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | test('63 edited turns: every turn listed, nothing noted', async ($, on) => { |
| 62 | const { ui } = await openOver($, on, 63) |
no test coverage detected