Commit graph

1 commit

Author SHA1 Message Date
Souta
b48f79afdb test: add unit tests for keyboard-interactive handler wiring (#173)
Extract `wireKeyboardInteractiveHandler()` from the inline logic in
`SftpClient.connect` so it can be tested with a plain EventEmitter
instead of mocking ssh2.Client.

Five test cases covering:
- echo:undefined normalisation to echo:false
- handler responses forwarded to finish()
- null (cancel) → finish([])
- handler error → finish([]) + warning log
- multi-prompt round-trip

Closes #173

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-30 22:17:10 +09:00