diff --git a/tests/unit/repositories/jobRepository.test.ts b/tests/unit/repositories/jobRepository.test.ts index a241cec7d..ba65df1d0 100644 --- a/tests/unit/repositories/jobRepository.test.ts +++ b/tests/unit/repositories/jobRepository.test.ts @@ -106,11 +106,11 @@ describe('Job Repository Tests', () => { test('getOneQueuedJobAndUpdate succeeds', async () => { const testData = TestDataProvider.getFindOneAndUpdateCallInfo(); - const mockVal = { value: getBuildJobPlain() }; + const mockVal = getBuildJobPlain(); jest.spyOn(jobRepo, 'notify').mockResolvedValueOnce(true); dbRepoHelper.collection.findOneAndUpdate.mockResolvedValueOnce(mockVal); - await expect(jobRepo.getOneQueuedJobAndUpdate()).resolves.toEqual(mockVal.value); + await expect(jobRepo.getOneQueuedJobAndUpdate()).resolves.toEqual(mockVal); expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledTimes(1); expect(dbRepoHelper.collection.findOneAndUpdate).toBeCalledWith( testData.query,