telnet-client
Advanced tools
Comparing version 0.10.4 to 0.10.6
@@ -11,3 +11,3 @@ var telnet = require('./lib') | ||
}).then(function() { | ||
connection.exec('hi') | ||
connection.send('hi') | ||
.then(function(res) { | ||
@@ -14,0 +14,0 @@ console.log(res) |
@@ -167,3 +167,3 @@ // Node.js Telnet client | ||
if (opts && opts.waitfor === undefined) { | ||
if ((opts && opts.waitfor === undefined) || !opts) { | ||
setTimeout(function() { | ||
@@ -170,0 +170,0 @@ if (response === '') return reject(new Error('response not received')) |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.10.4", | ||
"version": "0.10.6", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "engine": "node >= 0.10.29", |
@@ -49,3 +49,41 @@ var telnet = process.env.NODETELNETCLIENT_COV | ||
connection.connect(params); | ||
}, | ||
send_data_without_options: function(test) { | ||
var connection = new telnet() | ||
var params = { | ||
host: '127.0.0.1', | ||
port: 2323, | ||
negotiationMandatory: false | ||
} | ||
connection.on('connect', function() { | ||
connection.send('Hello, server.', function(error, data) { | ||
test.strictEqual(data.toString(), 'Hello, user.\r\n') | ||
test.done() | ||
connection.end() | ||
}) | ||
}) | ||
connection.connect(params) | ||
}, | ||
send_data_without_options_promise: function(test) { | ||
var connection = new telnet() | ||
var params = { | ||
host: '127.0.0.1', | ||
port: 2323, | ||
negotiationMandatory: false | ||
} | ||
connection.connect(params).then(function() { | ||
connection.send('Hello, server.').then(function(data) { | ||
test.strictEqual(data.toString(), 'Hello, user.\r\n') | ||
test.done() | ||
connection.end() | ||
}) | ||
}) | ||
} | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26889
476