Skip to content

Commit 0b9f9a2

Browse files
committed
Merge pull request #792 from visionmedia/fix-790
let server pick port for toError test
2 parents 6e45e58 + 4414aa7 commit 0b9f9a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/node/toError.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ app.get('/', function(req, res){
99
res.status(400).send('invalid json');
1010
});
1111

12-
app.listen(65197);
12+
var server = app.listen();
1313

1414
describe('res.toError()', function(){
1515
it('should return an Error', function(done){
1616
request
17-
.get('http://localhost:65197/')
17+
.get('http://localhost:' + server.address().port)
1818
.end(function(err, res){
1919
var err = res.toError();
2020
assert(err.status == 400);

0 commit comments

Comments
 (0)