Merge pull request #1079 from gradido/await-backaned-tests

fix: Await Resolved Promises in Backend Unit Tests
This commit is contained in:
Moriz Wahl 2021-11-17 14:18:24 +01:00 committed by GitHub
commit 9745433e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ describe('CommunityResolver', () => {
describe('getCommunityInfo', () => {
it('returns the default values', async () => {
expect(query({ query: getCommunityInfoQuery })).resolves.toMatchObject({
await expect(query({ query: getCommunityInfoQuery })).resolves.toMatchObject({
data: {
getCommunityInfo: {
name: 'Gradido Entwicklung',
@ -68,7 +68,7 @@ describe('CommunityResolver', () => {
})
it('returns three communities', async () => {
expect(query({ query: communities })).resolves.toMatchObject({
await expect(query({ query: communities })).resolves.toMatchObject({
data: {
communities: [
{
@ -104,7 +104,7 @@ describe('CommunityResolver', () => {
})
it('returns one community', async () => {
expect(query({ query: communities })).resolves.toMatchObject({
await expect(query({ query: communities })).resolves.toMatchObject({
data: {
communities: [
{