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); });