From c74a7e8088af068f6e1925eb5c953affd3d05a45 Mon Sep 17 00:00:00 2001 From: Michael Pertl Date: Thu, 29 Nov 2018 16:23:22 +0100 Subject: [PATCH] [@types/ssh2-sftp-client] multi-line "definitions by"; added new tests --- types/ssh2-sftp-client/index.d.ts | 5 ++++- types/ssh2-sftp-client/ssh2-sftp-client-tests.ts | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/types/ssh2-sftp-client/index.d.ts b/types/ssh2-sftp-client/index.d.ts index 8089810fa9..ac0c0847ee 100644 --- a/types/ssh2-sftp-client/index.d.ts +++ b/types/ssh2-sftp-client/index.d.ts @@ -1,6 +1,9 @@ // Type definitions for ssh2-sftp-client 2.4 // Project: https://www.npmjs.com/package/ssh2-sftp-client -// Definitions by: igrayson , Ascari Andrea , Kartik Malik , Michael Pertl +// Definitions by: igrayson +// Ascari Andrea +// Kartik Malik +// Michael Pertl // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as ssh2 from 'ssh2'; diff --git a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts index 8a9c99fde1..d59e552990 100644 --- a/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts +++ b/types/ssh2-sftp-client/ssh2-sftp-client-tests.ts @@ -1,5 +1,6 @@ import Client = require('ssh2-sftp-client'); import * as fs from 'fs'; + const client = new Client(); client.connect({ @@ -11,6 +12,10 @@ client.connect({ client.list('/remote/path').then(() => null); +client.exists('/remote/path').then(() => null); + +client.stat('/remote/path').then(() => null); + client.get('/remote/path').then(stream => stream.read(0)); client.get('/remote/path', true, 'utf8').then(stream => stream.read(0)); client.get('/remote/path', true, null).then(stream => stream.read(0)); @@ -30,6 +35,8 @@ client.delete('remote/path').then(() => null); client.rename('/remote/from', '/remote/to').then(() => null); +client.chmod('/remote/path', 777).then(() => null); + client.end().then(() => null); client.on('event', () => null);