Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Aug 7, 2019
1 parent 8d9ecd4 commit c0d3c02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/https-proxy/test/integration/proxy_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ describe "Proxy", ->
})
.then =>
throw new Error('should not succeed')
.catch { message: 'Error: Client network socket disconnected before secure TLS connection was established' }, =>
.catch { message: 'Error: socket hang up' }, =>
expect(createProxyConn).to.not.be.called
expect(createSocket).to.be.calledWith({
port: @proxy._sniPort
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/integration/http_requests_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe "Routes", ->
@proxy = "http://localhost:" + port
])

if @server
if @server?._server.listening
Promise.join(
httpsServer.stop()
@server.close()
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/integration/server_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe "Server", ->
@fileServer = @server._fileServer.address()
])

if @server
if @server?._server.listening
Promise.join(
httpsServer.stop()
@server.close()
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/unit/server_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe "lib/server", ->
@server._fileServer = @fileServer

afterEach ->
@server and @server.close()
@server?._server.listening and @server.close()

context "#createExpressApp", ->
beforeEach ->
Expand Down

0 comments on commit c0d3c02

Please sign in to comment.