Skip to content

Commit 1ddddf0

Browse files
author
hirsch88
committed
Refactor test utils
1 parent 441c1a6 commit 1ddddf0

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

test/e2e/api/info.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as request from 'supertest';
22
import { bootstrapApp, BootstrapSettings } from '../utils/bootstrap';
33
import { env } from '../../../src/core/env';
4-
import { synchronizeDatabase, closeDatabase } from '../../integration/utils/database';
54

65

76
describe('/api', () => {
@@ -12,13 +11,6 @@ describe('/api', () => {
1211

1312
let settings: BootstrapSettings;
1413
beforeAll(async () => settings = await bootstrapApp());
15-
beforeAll(async () => synchronizeDatabase(settings.connection));
16-
17-
// -------------------------------------------------------------------------
18-
// Tear down
19-
// -------------------------------------------------------------------------
20-
21-
afterAll(async () => closeDatabase(settings.connection));
2214

2315
// -------------------------------------------------------------------------
2416
// Test cases

test/e2e/api/users.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getFactory } from './../../../src/lib/seeds/index';
55
import { Factory } from './../../../src/lib/seeds/Factory';
66
import { User } from './../../../src/api/models/User';
77
import { bootstrapApp, BootstrapSettings } from '../utils/bootstrap';
8-
import { synchronizeDatabase, closeDatabase } from '../../integration/utils/database';
8+
import { synchronizeDatabase, closeDatabase } from '../../utils/database';
99
import { fakeAuthenticationForUser } from '../utils/auth';
1010

1111

test/integration/PetService.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Connection } from 'typeorm';
33

44
import { Pet } from '../../src/api/models/Pet';
55
import { PetService } from './../../src/api/services/PetService';
6-
import { createDatabaseConnection, synchronizeDatabase, closeDatabase } from './utils/database';
6+
import { createDatabaseConnection, synchronizeDatabase, closeDatabase } from '../utils/database';
77

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

File renamed without changes.

0 commit comments

Comments
 (0)