Skip to content

Commit 1bd41da

Browse files
committed
test: update
1 parent c79084e commit 1bd41da

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

test/helpers/test-server.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ function startFullSetup(config, options, done) {
2828
port = 8080;
2929
}
3030

31-
options.host = Object.prototype.hasOwnProperty.call(options, 'host')
32-
? options.host
33-
: 'localhost';
34-
3531
server.listen(port, options.host, (err) => {
3632
if (err && done) {
3733
return done(err);

test/server/host-option.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('host option', () => {
3434
it('server address', () => {
3535
const address = server.server.address();
3636

37-
expect(address.address).toBe('127.0.0.1');
37+
expect(address.address).toBe('::');
3838
expect(address.port).toBe(port);
3939
});
4040

test/server/port-option.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ describe('port', () => {
2525
watch: false,
2626
},
2727
port,
28+
host: 'localhost',
2829
},
2930
done
3031
);
@@ -57,6 +58,7 @@ describe('port', () => {
5758
},
5859
// eslint-disable-next-line no-undefined
5960
port: undefined,
61+
host: 'localhost',
6062
},
6163
done
6264
);
@@ -88,6 +90,7 @@ describe('port', () => {
8890
watch: false,
8991
},
9092
port: null,
93+
host: 'localhost',
9194
},
9295
done
9396
);
@@ -119,6 +122,7 @@ describe('port', () => {
119122
watch: false,
120123
},
121124
port: '33333',
125+
host: 'localhost',
122126
},
123127
done
124128
);
@@ -149,6 +153,7 @@ describe('port', () => {
149153
watch: false,
150154
},
151155
port: '33333',
156+
host: 'localhost',
152157
},
153158
done
154159
);

0 commit comments

Comments
 (0)