(item: string)
| 6 | // Uses mock implementation since React 19 + Bun + RTL renderHook() is unreliable |
| 7 | |
| 8 | function parseHistoryItem(item: string): { |
| 9 | mode: InputMode |
| 10 | displayText: string |
| 11 | } { |
| 12 | if (item.startsWith('!') && item.length > 1) { |
| 13 | return { mode: 'bash', displayText: item.slice(1) } |
| 14 | } |
| 15 | return { mode: 'default', displayText: item } |
| 16 | } |
| 17 | |
| 18 | describe('use-input-history - parseHistoryItem', () => { |
| 19 | describe('default mode entries', () => { |
no outgoing calls
no test coverage detected