(errorCode: number)
| 432 | } |
| 433 | |
| 434 | function makeSftpError(errorCode: number): Error { |
| 435 | const err = new Error('simulated SFTP error'); |
| 436 | (err as unknown as { code: number }).code = errorCode; |
| 437 | return err; |
| 438 | } |
| 439 | |
| 440 | // Minimal SFTPWrapper stub. For each I/O method, when `failing[method]` is |
| 441 | // true the callback is invoked with an error carrying `code`; otherwise |