back-projet-bUT3/jest.setup.ts

10 lines
218 B
TypeScript
Raw Normal View History

2024-01-28 14:31:51 +01:00
import mongoose from 'mongoose'
global.beforeEach(async () => {
await mongoose.connect(decodeURIComponent(process.env.MONGO_URL_TEST || ''))
})
global.afterEach(async () => {
await mongoose.connection.close()
})