sockit-to-me
Advanced tools
Comparing version 0.1.8 to 0.2.0
{ | ||
"name": "sockit-to-me", | ||
"version": "0.1.8", | ||
"version": "0.2.0", | ||
"author": "Ghislain 'Aus' Lacroix <aus@mozilla.com>", | ||
@@ -5,0 +5,0 @@ "description": "A synchronous socket API for node.js.", |
@@ -184,2 +184,30 @@ var assert = require('assert'); | ||
test('1s timeout if no data', function(done) { | ||
subject.setPollTimeout(1000); | ||
// Register a listener to ensure that the server really is ready | ||
server.on('message', function(message) { | ||
// Connected, ask server to send NOTHING. | ||
if(message.reply == 'connected') { | ||
var err; | ||
try { | ||
// Read the response. | ||
var response = subject.read(helo.length); | ||
} | ||
catch(e) { | ||
err = e; | ||
} | ||
assert.ok(err instanceof Error); | ||
done(); | ||
} | ||
}) | ||
// Connect to server. | ||
subject.connect({ host: host, port: port }); | ||
}); | ||
}); | ||
@@ -186,0 +214,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
198684
372
15