mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor(server): split api and jobs into separate e2e suites (#6307)
* refactor: domain and infra modules * refactor(server): e2e tests
This commit is contained in:
parent
e5786b200a
commit
bf1dd36fa9
50 changed files with 852 additions and 439 deletions
16
server/e2e/api/client/api-key-api.ts
Normal file
16
server/e2e/api/client/api-key-api.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { APIKeyCreateResponseDto } from '@app/domain';
|
||||
import { apiKeyCreateStub } from '@test';
|
||||
import request from 'supertest';
|
||||
|
||||
export const apiKeyApi = {
|
||||
createApiKey: async (server: any, accessToken: string) => {
|
||||
const { status, body } = await request(server)
|
||||
.post('/api-key')
|
||||
.set('Authorization', `Bearer ${accessToken}`)
|
||||
.send(apiKeyCreateStub);
|
||||
|
||||
expect(status).toBe(201);
|
||||
|
||||
return body as APIKeyCreateResponseDto;
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue