chore: allow custom mongourl during test (#2743)

Co-authored-by: swenzel <swen.wenzel@thearc.de>
Co-authored-by: PatrikKozak <patrik@trbl.design>
This commit is contained in:
Dan Ribbens
2023-05-31 15:51:49 -04:00
committed by GitHub
parent 8ee9724277
commit 93a85dd937
3 changed files with 18 additions and 7 deletions

View File

@@ -2,8 +2,8 @@ import fs from 'fs';
import path from 'path';
import express from 'express';
import { v4 as uuid } from 'uuid';
import * as dotenv from 'dotenv';
import payload from '../src';
import * as dotenv from "dotenv";
dotenv.config();
@@ -30,7 +30,7 @@ const expressApp = express();
const startDev = async () => {
await payload.init({
secret: uuid(),
mongoURL: process.env.MONGO_URL || 'mongodb://127.0.0.1/payload',
mongoURL: 'mongodb://127.0.0.1/payload',
express: expressApp,
email: {
logMockCredentials: true,