Skip to content

Commit

Permalink
Add globalSetup.ts comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 19, 2024
1 parent 509c42e commit e3b14fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/tests/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import User from '../src/models/User'

export default async function globalSetup() {
try {
// env admin
//
// create admin from env if not found
//
if (env.ADMIN_EMAIL) {
await databaseHelper.connect(env.DB_URI, false, false)
const adminFromEnv = await User.findOne({ email: env.ADMIN_EMAIL })
Expand Down

0 comments on commit e3b14fd

Please sign in to comment.