From 3071b32896dd004c9d8447724d7fb5fb479d844b Mon Sep 17 00:00:00 2001 From: Caesar Bell Date: Mon, 6 May 2024 12:52:17 -0400 Subject: [PATCH] :white_check_mark: DOP-4497 update test to fix 'TypeError: Right-hand side of 'instanceof' is not callable' --- tests/unit/repositories/jobRepository.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/unit/repositories/jobRepository.test.ts b/tests/unit/repositories/jobRepository.test.ts index ba65df1d0..5794a1ded 100644 --- a/tests/unit/repositories/jobRepository.test.ts +++ b/tests/unit/repositories/jobRepository.test.ts @@ -50,11 +50,11 @@ describe('Job Repository Tests', () => { expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledTimes(1); }); - test('Update with completion status succeeds', async () => { + test('Update with completion status succeeds', () => { setupForFindOneAndUpdateSuccess(); - await expect( - jobRepo.updateWithStatus('64ad959b423952aeb9341fad', 'All good', JobStatus.completed) - ).resolves.toEqual(job); + expect(jobRepo.updateWithStatus('64ad959b423952aeb9341fad', 'All good', JobStatus.completed)).resolves.toEqual( + job + ); expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledTimes(1); expect(dbRepoHelper.logger.error).toBeCalledTimes(0); });