feat(ui): add confirmations and terminal motion
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-05-12 19:44:18 -05:00
parent cc98aa180b
commit 0755213d6a
12 changed files with 263 additions and 29 deletions
+12
View File
@@ -36,6 +36,18 @@ describe('parser — verb-only commands', () => {
})
})
describe('parser — confirmations', () => {
it('recognizes yes and no confirmation replies', () => {
expect(parse('yes', emptyCtx)).toEqual({ kind: 'confirmation', confirmed: true })
expect(parse('y', emptyCtx)).toEqual({ kind: 'confirmation', confirmed: true })
expect(parse('no', emptyCtx)).toEqual({ kind: 'confirmation', confirmed: false })
})
it('keeps n as the north direction shortcut', () => {
expect(parse('n', emptyCtx)).toEqual({ kind: 'go', direction: 'n' })
})
})
describe('parser — direction shortcuts', () => {
it('maps single-letter directions', () => {
expect(parse('n', emptyCtx)).toEqual({ kind: 'go', direction: 'n' })