refactor(server): e2e (#6632)

This commit is contained in:
Jason Rasmussen 2024-01-24 17:24:53 -05:00 committed by GitHub
parent 4424f3cb13
commit 852effa998
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 154 additions and 485 deletions

View file

@ -1,16 +0,0 @@
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;
},
};