Files
twenty/packages/twenty-server/src/api/rest/api-rest.service.spec.ts
T
94487f6737 feat: refactor folder structure (#4498)
* feat: wip refactor folder structure

* Fix

* fix position

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-03-15 14:40:58 +01:00

41 lines
1.1 KiB
TypeScript

import { Test, TestingModule } from '@nestjs/testing';
import { HttpService } from '@nestjs/axios';
import { ApiRestService } from 'src/api/rest/api-rest.service';
import { EnvironmentService } from 'src/integrations/environment/environment.service';
import { TokenService } from 'src/engine/modules/auth/services/token.service';
import { ApiRestQueryBuilderFactory } from 'src/api/rest/api-rest-query-builder/api-rest-query-builder.factory';
describe('ApiRestService', () => {
let service: ApiRestService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
ApiRestService,
{
provide: ApiRestQueryBuilderFactory,
useValue: {},
},
{
provide: EnvironmentService,
useValue: {},
},
{
provide: TokenService,
useValue: {},
},
{
provide: HttpService,
useValue: {},
},
],
}).compile();
service = module.get<ApiRestService>(ApiRestService);
});
it('should be defined', () => {
expect(service).toBeDefined();
});
});