From 99cf850ab8eb2aa110fec6658d15593f59a84b9a Mon Sep 17 00:00:00 2001 From: canonbrother Date: Thu, 3 Oct 2024 14:32:36 +0800 Subject: [PATCH] fix wrong errmsg --- .../module.api/__defid__/transaction.controller.defid.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/whale-api/src/module.api/__defid__/transaction.controller.defid.ts b/apps/whale-api/src/module.api/__defid__/transaction.controller.defid.ts index 7c9b31aaa2..f3386b7a3c 100644 --- a/apps/whale-api/src/module.api/__defid__/transaction.controller.defid.ts +++ b/apps/whale-api/src/module.api/__defid__/transaction.controller.defid.ts @@ -76,7 +76,7 @@ describe('get', () => { }) }) - it('should fail due to non-existent transaction', async () => { + it.only('should fail due to non-existent transaction', async () => { // expect.assertions(2) // try { // await controller.get('invalidtransactionid') @@ -88,9 +88,7 @@ describe('get', () => { // error: 'Not Found' // }) // } - const res: any = await controller.get('invalidtransactionid') - expect(res.code).toStrictEqual(400) - expect(res.message).toStrictEqual('bad hex string length 64 (expected 20)') + await expect(controller.get('invalidtransactionid')).rejects.toThrowError('400 - BadRequest (/invalidtransactionid): bad hex string length 20 (expected 64)') }) })