test: add nodemailer adapter to email test config

This commit is contained in:
Elliot DeNolf
2024-04-18 13:36:48 -04:00
parent f0198b62f3
commit 6e4135e790

View File

@@ -1,3 +1,4 @@
import { createNodemailerAdapter } from '@payloadcms/email-nodemailer'
import path from 'path' import path from 'path'
import { getFileByPath } from 'payload/uploads' import { getFileByPath } from 'payload/uploads'
import { fileURLToPath } from 'url' import { fileURLToPath } from 'url'
@@ -15,6 +16,7 @@ export default buildConfigWithDefaults({
// ...extend config here // ...extend config here
collections: [PostsCollection, MediaCollection], collections: [PostsCollection, MediaCollection],
globals: [MenuGlobal], globals: [MenuGlobal],
email: createNodemailerAdapter(),
onInit: async (payload) => { onInit: async (payload) => {
await payload.create({ await payload.create({
collection: 'users', collection: 'users',