Skip to content

Commit

Permalink
feat(DTFS2-7049): fixed tests caused by removal of global transformer…
Browse files Browse the repository at this point in the history
… and allowing extra params
  • Loading branch information
avaitonis committed May 24, 2024
1 parent e0e099e commit 71e44ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/modules/numbers/dto/get-numbers-query.dto.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { ApiProperty } from '@nestjs/swagger';
import { Transform } from 'class-transformer';
import { IsInt, IsNotEmpty, IsString, Matches, Max, Min } from 'class-validator';

export class GetNumbersQueryDto {
@Transform(({ value }) => {
return parseInt(value);
})
@IsInt()
@IsNotEmpty()
@Min(1)
Expand Down
4 changes: 0 additions & 4 deletions test/customers/get-customers.api-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ describe('GET /customers', () => {
query: { name: valueGenerator.string({ length: 256 }) },
expectedError: 'name must be shorter than or equal to 255 characters',
},
{
query: { name: valueGenerator.word(), extraParameter: valueGenerator.word() },
expectedError: 'property extraParameter should not exist',
},
{
query: { companyReg: valueGenerator.string({ length: 7 }) },
expectedError: 'companyReg must be longer than or equal to 8 characters',
Expand Down

0 comments on commit 71e44ff

Please sign in to comment.