running worker in the test
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { env } from '../src/env'
|
||||
import { redisDataSource } from '../src/redis_data_source'
|
||||
import { createTestConnection } from './db'
|
||||
import { startApolloServer } from './util'
|
||||
import { startApolloServer, startWorker } from './util'
|
||||
|
||||
export const mochaGlobalSetup = async () => {
|
||||
await createTestConnection()
|
||||
@ -10,6 +10,11 @@ export const mochaGlobalSetup = async () => {
|
||||
if (env.redis.cache.url) {
|
||||
await redisDataSource.initialize()
|
||||
console.log('redis connection created')
|
||||
|
||||
if (redisDataSource.workerRedisClient) {
|
||||
startWorker(redisDataSource.workerRedisClient)
|
||||
console.log('worker started')
|
||||
}
|
||||
}
|
||||
|
||||
await startApolloServer()
|
||||
|
||||
Reference in New Issue
Block a user