From 6c8dbf9a29c0596b5130df8ae4f316c4d3d9bad8 Mon Sep 17 00:00:00 2001 From: Patrick Mooney Date: Mon, 16 Jun 2014 09:40:07 -0500 Subject: [PATCH] Use plans instead of timeouts for server tests --- test/server.test.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/server.test.js b/test/server.test.js index 0a8e9e2..f0de5a2 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -45,7 +45,8 @@ test('basic create', function (t) { t.end(); }); -test('listen on unix/named socket', { timeout: 1000 }, function (t) { +test('listen on unix/named socket', function (t) { + t.plan(1); server = ldap.createServer(); sock = getSock(); server.listen(sock, function () { @@ -55,7 +56,8 @@ test('listen on unix/named socket', { timeout: 1000 }, function (t) { }); }); -test('listen on static port', { timeout: 1000 }, function (t) { +test('listen on static port', function (t) { + t.plan(2); server = ldap.createServer(); server.listen(SERVER_PORT, '127.0.0.1', function () { var addr = server.address(); @@ -66,7 +68,8 @@ test('listen on static port', { timeout: 1000 }, function (t) { }); }); -test('listen on ephemeral port', { timeout: 1000 }, function (t) { +test('listen on ephemeral port', function (t) { + t.plan(2); server = ldap.createServer(); server.listen(0, 'localhost', function () { var addr = server.address(); @@ -77,7 +80,6 @@ test('listen on ephemeral port', { timeout: 1000 }, function (t) { }); }); - test('route order', function (t) { function generateHandler(response) { var func = function handler(req, res, next) {