Listen on 0 to get random port

This commit is contained in:
Kevin Sawicki 2014-05-05 14:06:47 -07:00
parent bed0408ed0
commit 2e5de25383

View file

@ -34,8 +34,8 @@ describe 'crash-reporter module', ->
res.end()
server.close()
done()
port = Math.floor(Math.random() * 55535 + 10000)
server.listen port, '127.0.0.1', ->
server.listen 0, '127.0.0.1', ->
{port} = server.address()
url = url.format
protocol: 'file'
pathname: path.join fixtures, 'api', 'crash.html'