Skip to content

Commit 72eeafb

Browse files
committed
test(notifier): update findOne assertion for projection arg
1 parent 077115d commit 72eeafb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

workers/notifier/tests/worker.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@ describe('NotifierWorker', () => {
242242

243243
await worker.handle(message);
244244

245-
expect(dbQueryMock).toBeCalledWith({ _id: new ObjectID(message.projectId) });
245+
expect(dbQueryMock).toBeCalledWith(
246+
{ _id: new ObjectID(message.projectId) },
247+
{ projection: { notifications: 1 } }
248+
);
246249
});
247250

248251
it('should close db connection on finish', async () => {

0 commit comments

Comments
 (0)