260322:1648 Correct Coresspondence / Doing RFA / Correct CI
This commit is contained in:
@@ -11,7 +11,7 @@ export class SearchProjectDto {
|
||||
@Transform(({ value }) => {
|
||||
if (value === 'true') return true;
|
||||
if (value === 'false') return false;
|
||||
return value;
|
||||
return value as boolean | undefined;
|
||||
})
|
||||
isActive?: boolean; // กรองตามสถานะ Active
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('ProjectController', () => {
|
||||
const mockResult = { data: [], meta: {} };
|
||||
(mockProjectService.findAll as jest.Mock).mockResolvedValue(mockResult);
|
||||
|
||||
const result = await controller.findAll({ page: 1, limit: 10 });
|
||||
const _result = await controller.findAll({ page: 1, limit: 10 });
|
||||
|
||||
expect(mockProjectService.findAll).toHaveBeenCalled();
|
||||
});
|
||||
@@ -59,7 +59,7 @@ describe('ProjectController', () => {
|
||||
mockOrgs
|
||||
);
|
||||
|
||||
const result = await controller.findAllOrgs();
|
||||
const _result = await controller.findAllOrgs();
|
||||
|
||||
expect(mockProjectService.findAllOrganizations).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -61,9 +61,10 @@ describe('ProjectService', () => {
|
||||
project_name: 'Test Project',
|
||||
},
|
||||
];
|
||||
mockProjectRepository
|
||||
.createQueryBuilder()
|
||||
.getManyAndCount.mockResolvedValue([mockProjects, 1]);
|
||||
const qb = mockProjectRepository.createQueryBuilder() as unknown as {
|
||||
getManyAndCount: jest.Mock;
|
||||
};
|
||||
qb.getManyAndCount.mockResolvedValue([mockProjects, 1]);
|
||||
|
||||
const result = await service.findAll({ page: 1, limit: 10 });
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Logger,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { Repository, Like } from 'typeorm';
|
||||
import { Repository, _Like } from 'typeorm';
|
||||
|
||||
// Entities
|
||||
import { Project } from './entities/project.entity';
|
||||
|
||||
Reference in New Issue
Block a user