From c24876c922d7bfe1673d29ab4496cc6cf3940e9f Mon Sep 17 00:00:00 2001 From: roschaefer Date: Mon, 23 Sep 2019 13:51:21 +0200 Subject: [PATCH] Add a double-check just to be sure --- backend/src/schema/resolvers/notifications.spec.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/schema/resolvers/notifications.spec.js b/backend/src/schema/resolvers/notifications.spec.js index 500ea98ca..1b9cac102 100644 --- a/backend/src/schema/resolvers/notifications.spec.js +++ b/backend/src/schema/resolvers/notifications.spec.js @@ -212,9 +212,12 @@ describe('given some notifications', () => { ]), }, }) - await expect( - query({ query: notificationQuery, variables: { ...variables, read: false } }), - ).resolves.toMatchObject(expected) + const response = await query({ + query: notificationQuery, + variables: { ...variables, read: false }, + }) + await expect(response).toMatchObject(expected) + await expect(response.data.notifications.length).toEqual(2) // double-check }) describe('if a resource gets deleted', () => {