chore: removes old refs to startMemoryDB

This commit is contained in:
James
2024-04-01 17:36:36 -04:00
parent abd404c57c
commit ec6bc8e36b
4 changed files with 3 additions and 11 deletions

View File

@@ -3,8 +3,7 @@ import type { Payload } from 'payload'
import { getPayload } from 'payload' import { getPayload } from 'payload'
import { NextRESTClient } from '../../helpers/NextRESTClient.js' import { NextRESTClient } from '../../helpers/NextRESTClient.js'
import { startMemoryDB } from '../../startMemoryDB.js' import config from './config.js'
import configPromise from './config.js'
import { usersSlug } from './shared.js' import { usersSlug } from './shared.js'
let payload: Payload let payload: Payload
@@ -18,7 +17,6 @@ const headers = {
describe('AuthStrategies', () => { describe('AuthStrategies', () => {
beforeAll(async () => { beforeAll(async () => {
const config = await startMemoryDB(configPromise)
payload = await getPayload({ config }) payload = await getPayload({ config })
restClient = new NextRESTClient(payload.config) restClient = new NextRESTClient(payload.config)
}) })

View File

@@ -4,15 +4,13 @@ import { getPayload } from 'payload'
import { devUser } from '../../credentials.js' import { devUser } from '../../credentials.js'
import { NextRESTClient } from '../../helpers/NextRESTClient.js' import { NextRESTClient } from '../../helpers/NextRESTClient.js'
import { startMemoryDB } from '../../startMemoryDB.js' import config, { collectionSlug } from './config.js'
import configPromise, { collectionSlug } from './config.js'
let restClient: NextRESTClient let restClient: NextRESTClient
let payload: Payload let payload: Payload
describe('Remove token from auth responses', () => { describe('Remove token from auth responses', () => {
beforeAll(async () => { beforeAll(async () => {
const config = await startMemoryDB(configPromise)
payload = await getPayload({ config }) payload = await getPayload({ config })
restClient = new NextRESTClient(payload.config) restClient = new NextRESTClient(payload.config)

View File

@@ -77,8 +77,6 @@ export async function buildConfigWithDefaults(
const url = mongoMemoryServer.getUri() const url = mongoMemoryServer.getUri()
console.log({ url })
databaseAdapters.mongodb = mongooseAdapter({ databaseAdapters.mongodb = mongooseAdapter({
mongoMemoryServer, mongoMemoryServer,
url, url,

View File

@@ -14,7 +14,6 @@ import type { LexicalField, LexicalMigrateField, RichTextField } from './payload
import { devUser } from '../credentials.js' import { devUser } from '../credentials.js'
import { NextRESTClient } from '../helpers/NextRESTClient.js' import { NextRESTClient } from '../helpers/NextRESTClient.js'
import { startMemoryDB } from '../startMemoryDB.js'
import { arrayDoc } from './collections/Array/shared.js' import { arrayDoc } from './collections/Array/shared.js'
import { lexicalDocData } from './collections/Lexical/data.js' import { lexicalDocData } from './collections/Lexical/data.js'
import { lexicalMigrateDocData } from './collections/LexicalMigrate/data.js' import { lexicalMigrateDocData } from './collections/LexicalMigrate/data.js'
@@ -22,7 +21,7 @@ import { richTextDocData } from './collections/RichText/data.js'
import { generateLexicalRichText } from './collections/RichText/generateLexicalRichText.js' import { generateLexicalRichText } from './collections/RichText/generateLexicalRichText.js'
import { textDoc } from './collections/Text/shared.js' import { textDoc } from './collections/Text/shared.js'
import { uploadsDoc } from './collections/Upload/shared.js' import { uploadsDoc } from './collections/Upload/shared.js'
import configPromise from './config.js' import config from './config.js'
import { clearAndSeedEverything } from './seed.js' import { clearAndSeedEverything } from './seed.js'
import { import {
arrayFieldsSlug, arrayFieldsSlug,
@@ -45,7 +44,6 @@ let createdRichTextDocID: number | string = null
describe('Lexical', () => { describe('Lexical', () => {
beforeAll(async () => { beforeAll(async () => {
process.env.SEED_IN_CONFIG_ONINIT = 'false' // Makes it so the payload config onInit seed is not run. Otherwise, the seed would be run unnecessarily twice for the initial test run - once for beforeEach and once for onInit process.env.SEED_IN_CONFIG_ONINIT = 'false' // Makes it so the payload config onInit seed is not run. Otherwise, the seed would be run unnecessarily twice for the initial test run - once for beforeEach and once for onInit
const config = await startMemoryDB(configPromise)
payload = await getPayload({ config }) payload = await getPayload({ config })
}) })