test: fix custom-graphql beforeAll

This commit is contained in:
Elliot DeNolf
2024-03-15 12:19:00 -04:00
parent 1550e32282
commit 978e19c817

View File

@@ -1,14 +1,17 @@
import type { Payload } from '../../packages/payload/src/index.js'
import { getPayload } from '../../packages/payload/src/index.js' import { getPayload } from '../../packages/payload/src/index.js'
import { NextRESTClient } from '../helpers/NextRESTClient.js' import { NextRESTClient } from '../helpers/NextRESTClient.js'
import { startMemoryDB } from '../startMemoryDB.js' import { startMemoryDB } from '../startMemoryDB.js'
import configPromise from './config.js' import configPromise from './config.js'
let restClient: NextRESTClient let restClient: NextRESTClient
let payload: Payload
describe('Custom GraphQL', () => { describe('Custom GraphQL', () => {
beforeAll(async () => { beforeAll(async () => {
const config = await startMemoryDB(configPromise) const config = await startMemoryDB(configPromise)
const payload = await getPayload({ config }) payload = await getPayload({ config })
restClient = new NextRESTClient(payload.config) restClient = new NextRESTClient(payload.config)
}) })