Skip to content

Commit

Permalink
Merge pull request #792 from visionmedia/fix-790
Browse files Browse the repository at this point in the history
let server pick port for toError test
  • Loading branch information
kornelski committed Dec 9, 2015
2 parents 6e45e58 + 4414aa7 commit 0b9f9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/node/toError.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ app.get('/', function(req, res){
res.status(400).send('invalid json');
});

app.listen(65197);
var server = app.listen();

describe('res.toError()', function(){
it('should return an Error', function(done){
request
.get('http://localhost:65197/')
.get('http://localhost:' + server.address().port)
.end(function(err, res){
var err = res.toError();
assert(err.status == 400);
Expand Down

0 comments on commit 0b9f9a2

Please sign in to comment.