Skip to content

Commit

Permalink
Add some waits
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Mar 30, 2024
1 parent a1df31e commit f02e065
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/cms/dynamicSchema/createDynamicSchema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ test('should filter on title field', async () => {
readonly books: readonly unknown[]
}, unknown>('mutation { createBook(title: "Lord of the rings") { title } }', {}, opts)

await wait(50)

const results = await app.gqlRequestUntyped<{
readonly filterBooks: readonly unknown[]
}, unknown>('query { filterBooks(title: { eq: "Lord of the rings" }) { title } }', {}, opts)
Expand All @@ -332,6 +334,8 @@ test('should get default hasKindleVersion', async () => {
readonly books: readonly unknown[]
}, unknown>('mutation { createBook(title: "Lord of the rings") { title } }', {}, opts)

await wait(50)

const results = await app.gqlRequestUntyped<{
readonly searchBooks: readonly unknown[]
}, unknown>('query { searchBooks(query: "Lord of") { title hasKindleVersion } }', {}, opts)
Expand Down
3 changes: 3 additions & 0 deletions packages/cms/graphql/Mutation/removeFieldsFromEntity.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTestApp } from '@zemble/core/test-utils'
import wait from '@zemble/utils/wait'
import {
beforeEach, test, expect, beforeAll, afterAll, afterEach,
} from 'bun:test'
Expand Down Expand Up @@ -58,6 +59,8 @@ test('should remove a title field', async () => {
],
}, opts)

await wait(50)

const { data } = await app.gqlRequest(RemoveFieldsFromEntityMutation, {
namePlural: 'books',
fields: ['title'],
Expand Down

0 comments on commit f02e065

Please sign in to comment.