Skip to content

Commit c370264

Browse files
committed
[test] Added functional unit test for #14.
1 parent 04be774 commit c370264

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/create-servers-test.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ test('only http', function (t) {
3535
});
3636
});
3737

38+
test('only http, port 0', function (t) {
39+
t.plan(4);
40+
createServers({
41+
log: console.log,
42+
http: 0,
43+
handler: fend
44+
}, function (err, servers) {
45+
console.dir(err);
46+
t.error(err);
47+
t.equals(typeof servers, 'object');
48+
t.equals(typeof servers.http, 'object');
49+
t.equals(typeof servers.http.address().port, 'number');
50+
servers.http.close();
51+
});
52+
});
53+
54+
3855
test('only https', function (t) {
3956
t.plan(3);
4057
createServers({

0 commit comments

Comments
 (0)