Skip to content

Commit

Permalink
Code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Nov 9, 2024
1 parent 30c57b3 commit 6a01ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/eta_test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ describe "eta()", ->
after -> controller.abort()

server = createServer app.callback()
url = new URL "http://127.0.0.1:3000/"
before (_, done) -> server.listen host: url.hostname, port: 0, signal: controller.signal, ->
url = new URL "http://127.0.0.1:0/"
before -> new Promise (resolve) -> server.listen host: url.hostname, port: Number(url.port), signal: controller.signal, ->
{address, port} = server.address()
url = new URL "http://#{address}:#{port}/"
done()
resolve()

describe "render()", ->
it "should have been added to the application context", ->
Expand Down

0 comments on commit 6a01ae5

Please sign in to comment.