diff --git a/backend/src/middleware/notifications/notificationsMiddleware.spec.js b/backend/src/middleware/notifications/notificationsMiddleware.spec.js index 50c423275..a9046b09f 100644 --- a/backend/src/middleware/notifications/notificationsMiddleware.spec.js +++ b/backend/src/middleware/notifications/notificationsMiddleware.spec.js @@ -859,6 +859,6 @@ describe('notifications', () => { errors: undefined, }) }) - }) + }) }) }) diff --git a/backend/src/schema/resolvers/notifications.spec.js b/backend/src/schema/resolvers/notifications.spec.js index 47134aea6..9deaea457 100644 --- a/backend/src/schema/resolvers/notifications.spec.js +++ b/backend/src/schema/resolvers/notifications.spec.js @@ -397,18 +397,20 @@ describe('given some notifications', () => { it('returns all as read', async () => { const response = await mutate({ mutation: markAllAsReadMutation(), variables }) - expect(response.data.markAllAsRead).toEqual([ - { - createdAt: '2019-08-30T19:33:48.651Z', - from: { __typename: 'Comment', content: 'You have been mentioned in a comment' }, - read: true, - }, - { - createdAt: '2019-08-31T17:33:48.651Z', - from: { __typename: 'Post', content: 'You have been mentioned in a post' }, - read: true, - }, - ]) + expect(response.data.markAllAsRead).toEqual( + expect.arrayContaining([ + { + createdAt: '2019-08-30T19:33:48.651Z', + from: { __typename: 'Comment', content: 'You have been mentioned in a comment' }, + read: true, + }, + { + createdAt: '2019-08-31T17:33:48.651Z', + from: { __typename: 'Post', content: 'You have been mentioned in a post' }, + read: true, + }, + ]), + ) expect(response.errors).toBeUndefined() }) })