Skip to content

Commit 4bbe1ce

Browse files
committed
Specify port and hostname explicitly
1 parent bcf60ac commit 4bbe1ce

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/helpers/test-http-server.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ class TestHTTPServer {
2121
app.get('/*', this.middleware);
2222

2323
return new Promise((resolve, reject) => {
24-
let listener = app.listen(options.port, options.host, () => {
24+
let port = options.port || 3000;
25+
let host = options.host || 'localhost';
26+
27+
let listener = app.listen(port, host, () => {
2528
let host = listener.address().address;
2629
let port = listener.address().port;
2730
let family = listener.address().family;

0 commit comments

Comments
 (0)