mirror of
https://github.com/IT4Change/boilerplate-backend.git
synced 2025-12-13 10:25:49 +00:00
13 lines
375 B
TypeScript
13 lines
375 B
TypeScript
import { ApolloServer } from 'apollo-server-express'
|
|
import { createTestClient } from 'apollo-server-testing'
|
|
|
|
import { schema } from '#graphql/schema'
|
|
|
|
export const testEnvironment = async () => {
|
|
const server = new ApolloServer({
|
|
schema: await schema(),
|
|
})
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
return createTestClient(server as any)
|
|
}
|