From 9c050b3c6e5addf1d7df6c3fc1d3cd7518429a6b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 20 Nov 2017 16:14:19 +0200 Subject: [PATCH] test(config) listen --- test/server/config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/server/config.js b/test/server/config.js index da1d79ab..8371a700 100644 --- a/test/server/config.js +++ b/test/server/config.js @@ -63,3 +63,16 @@ test('config: manage: get: *', (t) => { t.end(); }); +test('config: listen: no socket', (t) => { + t.throws(config.listen, 'should throw when no socket'); + t.end(); +}); + +test('config: listen: authCheck: not function', (t) => { + const socket = {}; + const fn = () => config.listen(socket, 'hello'); + + t.throws(fn, 'should throw when authCheck not function'); + t.end(); +}); +