Skip to content

Commit

Permalink
Ensure express closes its connection after ending tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elboletaire committed Nov 15, 2018
1 parent a7cf365 commit 3989820
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import request from 'supertest'
import SwitchBoardOperator from './app'

afterAll(() => {
SwitchBoardOperator.app.close();
})

describe('main app', () => {
it('expressjs should listen on port 3000', (done) => {
request(SwitchBoardOperator.app)
Expand Down

0 comments on commit 3989820

Please sign in to comment.