test: add test email adapter, use for all tests by default (#6120)

This commit is contained in:
Elliot DeNolf
2024-04-29 14:38:35 -04:00
committed by GitHub
parent cce75f11ca
commit 2e77bdf11e
3 changed files with 41 additions and 18 deletions

View File

@@ -34,6 +34,7 @@ import sharp from 'sharp'
import { reInitEndpoint } from './helpers/reInit.js'
import { localAPIEndpoint } from './helpers/sdk/endpoint.js'
import { testEmailAdapter } from './testEmailAdapter.js'
// process.env.PAYLOAD_DATABASE = 'postgres'
export async function buildConfigWithDefaults(
@@ -74,23 +75,7 @@ export async function buildConfigWithDefaults(
const config: Config = {
db: databaseAdapters[process.env.PAYLOAD_DATABASE || 'mongodb'],
secret: 'TEST_SECRET',
//editor: slateEditor({}),
// editor: slateEditor({
// admin: {
// upload: {
// collections: {
// media: {
// fields: [
// {
// name: 'alt',
// type: 'text',
// },
// ],
// },
// },
// },
// },
// }),
email: testEmailAdapter,
endpoints: [localAPIEndpoint, reInitEndpoint],
editor: lexicalEditor({
features: [