Fix refreshing test window
This commit is contained in:
parent
cd7b3dd291
commit
13c1b078f9
2 changed files with 6 additions and 1 deletions
|
@ -39,8 +39,12 @@ describe 'crash-reporter module', ->
|
|||
res.end('abc-123-def')
|
||||
server.close()
|
||||
done()
|
||||
server.listen 0, '127.0.0.1', ->
|
||||
# Server port is generated randomly for the first run, it will be reused
|
||||
# when page is refreshed.
|
||||
port = remote.process.port
|
||||
server.listen port, '127.0.0.1', ->
|
||||
{port} = server.address()
|
||||
remote.process.port = port
|
||||
url = url.format
|
||||
protocol: 'file'
|
||||
pathname: path.join fixtures, 'api', 'crash.html'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue