Skip to content

Commit

Permalink
fix: app.close() afterAll e2e tests (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastienterrier committed Jun 12, 2019
1 parent a71fce9 commit a5cd3dd
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/application.controller.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ describe('ApplicationController (e2e)', () => {
'<p>Have a look at our <a href="https://dx-developerexperience.github.io/git-webhooks/">documentation</a> for more informations.</p>',
);
});

afterAll(async () => {
await app.close();
});
});
4 changes: 4 additions & 0 deletions src/controllers/cron.controller.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ describe('CronController', () => {
.post('/cron')
.expect(HttpStatus.PRECONDITION_FAILED);
});

afterAll(async () => {
await app.close();
});
});
4 changes: 4 additions & 0 deletions src/controllers/documentation.controller.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ describe('/doc (e2e)', () => {
.get('/doc/schema')
.expect(200);
});

afterAll(async () => {
await app.close();
});
});
4 changes: 4 additions & 0 deletions src/remote-config/utils.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ describe('getAppRules (e2e)', () => {
})
.expect(200);
});

afterAll(async () => {
await app.close();
});
});
4 changes: 4 additions & 0 deletions src/webhook/webhook.interceptor.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ describe('/webhook (POST) - In WhiteList', () => {
.post('/webhook')
.expect(HttpStatus.PRECONDITION_FAILED);
});

afterAll(async () => {
await app.close();
});
});
4 changes: 4 additions & 0 deletions src/webhook/whiteList.interceptor.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ describe('/webhook (POST) - Not in WhiteList', () => {
.post('/webhook')
.expect(HttpStatus.UNAUTHORIZED);
});

afterAll(async () => {
await app.close();
});
});

0 comments on commit a5cd3dd

Please sign in to comment.