File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { MongoMemoryReplSet } from 'mongodb-memory-server'
2
+ import dotenv from 'dotenv'
3
+ dotenv . config ( )
4
+
2
5
3
6
// eslint-disable-next-line no-restricted-exports
4
7
export default async ( ) => {
5
- console . log ( 'Starting memory db...' )
6
-
7
8
// @ts -expect-error
8
9
process . env . NODE_ENV = 'test'
9
10
process . env . PAYLOAD_DROP_DATABASE = 'true'
@@ -14,6 +15,7 @@ export default async () => {
14
15
( ! process . env . PAYLOAD_DATABASE || process . env . PAYLOAD_DATABASE === 'mongodb' ) &&
15
16
! global . _mongoMemoryServer
16
17
) {
18
+ console . log ( 'Starting memory db...' )
17
19
const db = await MongoMemoryReplSet . create ( {
18
20
replSet : {
19
21
count : 3 ,
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import { jest } from '@jest/globals'
2
2
import console from 'console'
3
3
global . console = console
4
4
5
+ import dotenv from 'dotenv'
6
+ dotenv . config ( )
7
+
5
8
import nodemailer from 'nodemailer'
6
9
7
10
import { generateDatabaseAdapter } from './generateDatabaseAdapter.js'
You can’t perform that action at this time.
0 commit comments