Skip to content

Commit

Permalink
let server pick port for toError test
Browse files Browse the repository at this point in the history
For #790
  • Loading branch information
focusaurus committed Nov 24, 2015
1 parent e3e37f7 commit 4414aa7
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 4414aa7

Please sign in to comment.