Skip to content

Commit

Permalink
cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Mar 25, 2019
1 parent 30e5f98 commit d58d7d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/app.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export function startServer(app, port) {
const server = http.createServer(app);
server.listen(port);
console.log(`Listening on port ${port}`);
app.server = server;
return app;
}

Expand Down
4 changes: 4 additions & 0 deletions test/headers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import app from './app';
const packageJson = require('../package.json');

describe(packageJson.name, () => {
after(() => {
app.server.close();
});

it('should throw 400 if required header is missing', async () =>
request(app)
.get('/v1/pets/10/attributes')
Expand Down
3 changes: 3 additions & 0 deletions test/routes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import app from './app';
const packageJson = require('../package.json');

describe(packageJson.name, () => {
after(() => {
app.server.close();
});
it(`should test something`, () => {
expect('a').to.equal('a');
});
Expand Down

0 comments on commit d58d7d2

Please sign in to comment.