mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix tests
This commit is contained in:
parent
07a14e0a7f
commit
a062152d4a
3 changed files with 11 additions and 7 deletions
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"extension": ["ts"],
|
||||
"spec": "test/**/*.test.ts"
|
||||
"spec": "test/**/*.test.ts",
|
||||
"require": ["test/global-teardown.ts"],
|
||||
"timeout": 10000
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,12 +81,9 @@ export const redisDataSource = new RedisDataSource({
|
|||
const gracefulShutdown = async (signal: string) => {
|
||||
console.log(`Received ${signal}, shutting down gracefully...`)
|
||||
|
||||
try {
|
||||
await redisDataSource.shutdown()
|
||||
console.log('redis shutdown successfully')
|
||||
} catch (error) {
|
||||
console.error('error while shutting down redis', error)
|
||||
}
|
||||
await redisDataSource.shutdown()
|
||||
console.log('redis shutdown successfully')
|
||||
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
|
|
|
|||
5
packages/inbound-email-handler/test/global-teardown.ts
Normal file
5
packages/inbound-email-handler/test/global-teardown.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { redisDataSource } from '../src/redis_data_source'
|
||||
|
||||
export const mochaGlobalTeardown = async () => {
|
||||
await redisDataSource.shutdown()
|
||||
}
|
||||
Loading…
Reference in a new issue