mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #1679 from Human-Connection/fix_intermittent_backed_specs
Fix intermittent backend specs
This commit is contained in:
commit
af7ab74e4d
@ -192,7 +192,7 @@ describe('given some notifications', () => {
|
|||||||
it('returns only unread notifications of current user', async () => {
|
it('returns only unread notifications of current user', async () => {
|
||||||
const expected = expect.objectContaining({
|
const expected = expect.objectContaining({
|
||||||
data: {
|
data: {
|
||||||
notifications: [
|
notifications: expect.arrayContaining([
|
||||||
{
|
{
|
||||||
from: {
|
from: {
|
||||||
__typename: 'Comment',
|
__typename: 'Comment',
|
||||||
@ -209,12 +209,15 @@ describe('given some notifications', () => {
|
|||||||
read: false,
|
read: false,
|
||||||
createdAt: '2019-08-31T17:33:48.651Z',
|
createdAt: '2019-08-31T17:33:48.651Z',
|
||||||
},
|
},
|
||||||
],
|
]),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
await expect(
|
const response = await query({
|
||||||
query({ query: notificationQuery, variables: { ...variables, read: false } }),
|
query: notificationQuery,
|
||||||
).resolves.toMatchObject(expected)
|
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', () => {
|
describe('if a resource gets deleted', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user