mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
refactor: e2e tests (#4536)
This commit is contained in:
@@ -5,7 +5,7 @@ import { INestApplication } from '@nestjs/common';
|
||||
import { api } from '@test/api';
|
||||
import { db } from '@test/db';
|
||||
import { errorStub, uuidStub } from '@test/fixtures';
|
||||
import { createTestApp } from '@test/test-utils';
|
||||
import { testApp } from '@test/test-utils';
|
||||
import request from 'supertest';
|
||||
|
||||
describe(`${PersonController.name}`, () => {
|
||||
@@ -18,11 +18,14 @@ describe(`${PersonController.name}`, () => {
|
||||
let hiddenPerson: PersonEntity;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await createTestApp();
|
||||
server = app.getHttpServer();
|
||||
[server, app] = await testApp.create();
|
||||
personRepository = app.get<IPersonRepository>(IPersonRepository);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await testApp.teardown();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await db.reset();
|
||||
await api.authApi.adminSignUp(server);
|
||||
@@ -46,11 +49,6 @@ describe(`${PersonController.name}`, () => {
|
||||
await personRepository.createFace({ assetId: faceAsset.id, personId: hiddenPerson.id });
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await db.disconnect();
|
||||
await app.close();
|
||||
});
|
||||
|
||||
describe('GET /person', () => {
|
||||
beforeEach(async () => {});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user