mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: e2e tests (#4536)
This commit is contained in:
parent
31987bc043
commit
4b59f83288
22 changed files with 189 additions and 201 deletions
|
|
@ -1,18 +1,19 @@
|
|||
import { OAuthController } from '@app/immich';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { api } from '@test/api';
|
||||
import { db } from '@test/db';
|
||||
import { errorStub } from '@test/fixtures';
|
||||
import { createTestApp } from '@test/test-utils';
|
||||
import { testApp } from '@test/test-utils';
|
||||
import request from 'supertest';
|
||||
|
||||
describe(`${OAuthController.name} (e2e)`, () => {
|
||||
let app: INestApplication;
|
||||
let server: any;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await createTestApp();
|
||||
server = app.getHttpServer();
|
||||
[server] = await testApp.create();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await testApp.teardown();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
|
|
@ -20,11 +21,6 @@ describe(`${OAuthController.name} (e2e)`, () => {
|
|||
await api.authApi.adminSignUp(server);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await db.disconnect();
|
||||
await app.close();
|
||||
});
|
||||
|
||||
describe('POST /oauth/authorize', () => {
|
||||
beforeEach(async () => {
|
||||
await db.reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue