diff --git a/src/app.spec.ts b/src/app.spec.ts index 4ddf3a3..d4c340a 100644 --- a/src/app.spec.ts +++ b/src/app.spec.ts @@ -2,7 +2,7 @@ import request from 'supertest' import SwitchBoardOperator from './app' afterAll(() => { - SwitchBoardOperator.app.close(); + SwitchBoardOperator.server.close(); }) describe('main app', () => { diff --git a/src/app.ts b/src/app.ts index d9283f5..a8e0f53 100644 --- a/src/app.ts +++ b/src/app.ts @@ -18,6 +18,7 @@ class SwitchBoardOperator { topology: Topology rabbotClient: any public app: any + public server: any constructor() { this.mergedConfig = Object.assign(config.get('topology'), { @@ -69,7 +70,7 @@ class SwitchBoardOperator { }) }) - app.listen(3000, () => { + this.server = app.listen(3000, () => { logger.info('SwitchBoard Operator listening on port 3000!') })