chore: work to add consistency to fields e2e

This commit is contained in:
James
2024-04-04 14:41:58 -04:00
parent faef0784ee
commit 5d57572694
9 changed files with 488 additions and 469 deletions

View File

@@ -1,4 +1,5 @@
import minimist from 'minimist'
import { MongoMemoryReplSet } from 'mongodb-memory-server'
import { nextDev } from 'next/dist/cli/next-dev.js'
import { dirname, resolve } from 'path'
import { fileURLToPath } from 'url'
@@ -31,6 +32,16 @@ const rootDir = resolve(_dirname, '../')
if (args.o) {
await open('http://localhost:3000/admin')
}
global._mongoMemoryServer = await MongoMemoryReplSet.create({
replSet: {
count: 3,
dbName: 'payloadmemory',
},
})
process.env.MONGODB_MEMORY_SERVER_URI = global._mongoMemoryServer.getUri()
// @ts-expect-error
await nextDev({ port: process.env.PORT || 3000, dirname: rootDir }, 'default', rootDir)