We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1c4402 commit 8847310Copy full SHA for 8847310
test/supertest.js
@@ -80,7 +80,7 @@ describe('request(app)', function () {
80
res.send('hey');
81
});
82
83
- server = app.listen(4000, function () {
+ server = app.listen(function () {
84
request(server)
85
.get('/')
86
.end(function (err, res) {
@@ -99,8 +99,9 @@ describe('request(app)', function () {
99
100
101
102
- server = app.listen(4001, function () {
103
- request('http://localhost:4001')
+ const url = 'http://localhost:' + server.address().port;
104
+ request(url)
105
106
107
res.status.should.equal(200);
0 commit comments