mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(config) listen
This commit is contained in:
parent
45b6d20aaa
commit
9c050b3c6e
1 changed files with 13 additions and 0 deletions
|
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue