mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Add errors undefined to tests
- helps with debugging
This commit is contained in:
parent
760fd01715
commit
ca9c58c06b
@ -383,7 +383,10 @@ describe('UpdatePost', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('updates a post', async () => {
|
it('updates a post', async () => {
|
||||||
const expected = { data: { UpdatePost: { id: 'p9876', content: 'New content' } } }
|
const expected = {
|
||||||
|
data: { UpdatePost: { id: 'p9876', content: 'New content' } },
|
||||||
|
errors: undefined,
|
||||||
|
}
|
||||||
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
||||||
expected,
|
expected,
|
||||||
)
|
)
|
||||||
@ -394,6 +397,7 @@ describe('UpdatePost', () => {
|
|||||||
data: {
|
data: {
|
||||||
UpdatePost: { id: 'p9876', content: 'New content', createdAt: expect.any(String) },
|
UpdatePost: { id: 'p9876', content: 'New content', createdAt: expect.any(String) },
|
||||||
},
|
},
|
||||||
|
errors: undefined,
|
||||||
}
|
}
|
||||||
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
||||||
expected,
|
expected,
|
||||||
@ -421,6 +425,7 @@ describe('UpdatePost', () => {
|
|||||||
categories: expect.arrayContaining([{ id: 'cat9' }, { id: 'cat4' }, { id: 'cat15' }]),
|
categories: expect.arrayContaining([{ id: 'cat9' }, { id: 'cat4' }, { id: 'cat15' }]),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
errors: undefined,
|
||||||
}
|
}
|
||||||
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
||||||
expected,
|
expected,
|
||||||
@ -441,6 +446,7 @@ describe('UpdatePost', () => {
|
|||||||
categories: expect.arrayContaining([{ id: 'cat27' }]),
|
categories: expect.arrayContaining([{ id: 'cat27' }]),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
errors: undefined,
|
||||||
}
|
}
|
||||||
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
await expect(mutate({ mutation: updatePostMutation, variables })).resolves.toMatchObject(
|
||||||
expected,
|
expected,
|
||||||
@ -722,6 +728,7 @@ describe('UpdatePost', () => {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
errors: undefined,
|
||||||
}
|
}
|
||||||
variables = { orderBy: ['pinned_desc', 'createdAt_desc'] }
|
variables = { orderBy: ['pinned_desc', 'createdAt_desc'] }
|
||||||
await expect(query({ query: postOrderingQuery, variables })).resolves.toMatchObject(
|
await expect(query({ query: postOrderingQuery, variables })).resolves.toMatchObject(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user