Deconstruct not authenticated.

This commit is contained in:
elweyn 2023-02-09 16:24:18 +01:00
parent 96feb30476
commit e5025a906c

View File

@ -938,8 +938,7 @@ describe('ContributionResolver', () => {
describe('listContributions', () => { describe('listContributions', () => {
describe('unauthenticated', () => { describe('unauthenticated', () => {
it('returns an error', async () => { it('returns an error', async () => {
await expect( const { errors: errorObjects }: { errors: [GraphQLError] } = await query({
query({
query: listContributions, query: listContributions,
variables: { variables: {
currentPage: 1, currentPage: 1,
@ -947,12 +946,8 @@ describe('ContributionResolver', () => {
order: 'DESC', order: 'DESC',
filterConfirmed: false, filterConfirmed: false,
}, },
}), })
).resolves.toEqual( expect(errorObjects).toMatchObject([new GraphQLError('401 Unauthorized')])
expect.objectContaining({
errors: [new GraphQLError('401 Unauthorized')],
}),
)
}) })
}) })