From a3b2c6987f47b26ceabce42638847b7e26748bd1 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Mon, 26 Jun 2023 18:08:52 +1200 Subject: [PATCH] Fix test --- server/homebrew.api.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/homebrew.api.spec.js b/server/homebrew.api.spec.js index 464661441..cc940f52b 100644 --- a/server/homebrew.api.spec.js +++ b/server/homebrew.api.spec.js @@ -543,8 +543,8 @@ brew`); describe('deleteBrew', ()=>{ it('should handle case where fetching the brew returns an error', async ()=>{ - api.getBrew = jest.fn(()=>async ()=>{ throw 'err'; }); - api.getId = jest.fn(()=>({ id: '1', googleId: '2', HBErrorCode: '02' })); + api.getBrew = jest.fn(()=>async ()=>{ throw {message: 'err', HBErrorCode: '02' }; }); + api.getId = jest.fn(()=>({ id: '1', googleId: '2' })); model.deleteOne = jest.fn(async ()=>{}); const next = jest.fn(()=>{});