mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-03-29 08:39:03 +08:00
Listen on 0 to get random port
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user