back-projet-bUT3/jest.setup.ts
2024-03-07 11:45:33 +01:00

10 lines
218 B
TypeScript

import mongoose from 'mongoose'
global.beforeEach(async () => {
await mongoose.connect(decodeURIComponent(process.env.MONGO_URL_TEST || ''))
})
global.afterEach(async () => {
await mongoose.connection.close()
})