feat: initialize the server e2e tests

This commit is contained in:
Ahmed Bouhuolia
2024-12-15 00:49:10 +02:00
parent 05f4b49b58
commit 2ba31148ca
10 changed files with 43 additions and 278 deletions

View File

@@ -0,0 +1,19 @@
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { faker } from '@faker-js/faker';
import { AppModule } from '../src/modules/App/App.module';
import { app } from './init-app-test';
describe('Items (e2e)', () => {
it('/items (POST)', () => {
return request(app.getHttpServer())
.post('/items')
.set('organization-id', '4064541lv40nhca')
.send({
name: faker.commerce.productName(),
type: 'service',
})
.expect(201);
});
});