Fix intermittent failing test

- not concerned about the order of the notification in this test
This commit is contained in:
mattwr18 2019-09-13 20:51:15 +02:00
parent d1ecac4580
commit bec629e8ef

View File

@ -145,9 +145,7 @@ describe('given some notifications', () => {
describe('no filters', () => {
it('returns all notifications of current user', async () => {
const expected = {
data: {
notifications: [
const expected = [
{
from: {
__typename: 'Comment',
@ -180,12 +178,13 @@ describe('given some notifications', () => {
read: false,
createdAt: '2019-08-31T17:33:48.651Z',
},
],
]
await expect(query({ query: notificationQuery, variables })).resolves.toMatchObject({
data: {
notifications: expect.arrayContaining(expected),
},
}
await expect(query({ query: notificationQuery, variables })).resolves.toMatchObject(
expected,
)
})
})
})