Skip to content

Commit 819fc05

Browse files
author
hirsch88
committed
Refactor test utils
1 parent 1ddddf0 commit 819fc05

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

test/e2e/api/info.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { env } from '../../../src/core/env';
66
describe('/api', () => {
77

88
// -------------------------------------------------------------------------
9-
// Tear up
9+
// Setup up
1010
// -------------------------------------------------------------------------
1111

1212
let settings: BootstrapSettings;

test/e2e/api/users.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { fakeAuthenticationForUser } from '../utils/auth';
1212
describe('/api/users', () => {
1313

1414
// -------------------------------------------------------------------------
15-
// Tear up
15+
// Setup up
1616
// -------------------------------------------------------------------------
1717

1818
let settings: BootstrapSettings;

test/integration/PetService.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,24 @@ import { createDatabaseConnection, synchronizeDatabase, closeDatabase } from '..
77

88
describe('PetService', () => {
99

10+
// -------------------------------------------------------------------------
11+
// Setup up
12+
// -------------------------------------------------------------------------
13+
1014
let connection: Connection;
1115
beforeAll(async () => connection = await createDatabaseConnection());
1216
beforeEach(() => synchronizeDatabase(connection));
17+
18+
// -------------------------------------------------------------------------
19+
// Tear down
20+
// -------------------------------------------------------------------------
21+
1322
afterAll(() => closeDatabase(connection));
1423

24+
// -------------------------------------------------------------------------
25+
// Test cases
26+
// -------------------------------------------------------------------------
27+
1528
test('should create a new pet in the database', async (done) => {
1629
const pet = new Pet();
1730
pet.name = 'test';

0 commit comments

Comments
 (0)