From c7b6eba2f177ba2e290290bc3ede7af7173aeee0 Mon Sep 17 00:00:00 2001 From: Michael Solomon Date: Thu, 29 Oct 2020 20:03:00 +0200 Subject: [PATCH] fix --- packages/common/test/pipes/validation.pipe.spec.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/common/test/pipes/validation.pipe.spec.ts b/packages/common/test/pipes/validation.pipe.spec.ts index 1f5f3dfdcee..fbb97844f63 100644 --- a/packages/common/test/pipes/validation.pipe.spec.ts +++ b/packages/common/test/pipes/validation.pipe.spec.ts @@ -403,7 +403,7 @@ describe('ValidationPipe', () => { public prop1: string; @IsBoolean() - public prop2: string; + public prop2: boolean; @IsOptional() @IsString() @@ -418,9 +418,9 @@ describe('ValidationPipe', () => { }; target = new ValidationPipe({ expectedType: TestModel }); - const testObj = { prop1: 'value1', prop2: 1 }; + const testObj = { prop1: 'value1', prop2: 'value2' }; - await expect(target.transform(testObj, m)).rejectedWith(BadRequestException); + expect(await target.transform(testObj, m)).to.equal(testObj); }); it('should validate against the expected type if presented and metatype is primitive type', async () => { @@ -431,9 +431,9 @@ describe('ValidationPipe', () => { }; target = new ValidationPipe({ expectedType: TestModel }); - const testObj = { prop1: 'value1', prop2: 1 }; + const testObj = { prop1: 'value1', prop2: 'value2' }; - await expect(target.transform(testObj, m)).rejectedWith(BadRequestException); + expect(await target.transform(testObj, m)).to.equal(testObj); }); }); });