Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-07-22 03:23:50 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2011-07-22 03:23:50 +0400
commit984dc057e39b09443cb31345b256b596509a588d (patch)
tree52f315adbc106fe719339ba50da09733e02ae9cd /test
parent345df289eb775aa2c195056ab88adf2c6ab95d66 (diff)
net_uv: throw if Server.prototype.close() is called twice
Follows net_legacy behaviour.
Diffstat (limited to 'test')
-rw-r--r--test/simple/test-http-unix-socket.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/simple/test-http-unix-socket.js b/test/simple/test-http-unix-socket.js
index 2a002332f5c..857ef6e32bd 100644
--- a/test/simple/test-http-unix-socket.js
+++ b/test/simple/test-http-unix-socket.js
@@ -75,8 +75,12 @@ server.listen(common.PIPE, function() {
});
process.on('exit', function() {
- server.close();
assert.ok(status_ok);
assert.ok(headers_ok);
assert.ok(body_ok);
+
+ // Double close should throw. Follows net_legacy behaviour.
+ assert.throws(function() {
+ server.close();
+ });
});