Files
omnivore/packages/api/test/global-setup.ts
Hongbo Wu f4ff4b9fcd fix tests
2024-01-04 22:27:31 +08:00

18 lines
454 B
TypeScript

import { env } from '../src/env'
import { redisClient } from '../src/redis'
import { createTestConnection } from './db'
import { startApolloServer } from './util'
export const mochaGlobalSetup = async () => {
await createTestConnection()
console.log('db connection created')
if (env.redis.url) {
await redisClient.connect()
console.log('redis connection created')
}
await startApolloServer()
console.log('apollo server started')
}