chore: fixes e2e test running on windows (#5927)

This commit is contained in:
Dan Ribbens
2024-04-20 14:54:18 -04:00
committed by GitHub
parent d5cbbc472d
commit 56df60f520
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ type Result = {
}
export async function initPayloadE2E({ dirname }: Args): Promise<Result> {
const testSuiteName = dirname.split('/').pop()
const testSuiteName = path.basename(dirname)
const { beforeTest } = await createTestHooks(testSuiteName)
await beforeTest()
await startMemoryDB()

View File

@@ -1,7 +1,7 @@
import { createServer } from 'http'
import nextImport from 'next'
import { spawn } from 'node:child_process'
import { dirname, resolve } from 'path'
import path, { dirname, resolve } from 'path'
import { wait } from 'payload/utilities'
import { parse } from 'url'
import { fileURLToPath } from 'url'
@@ -30,7 +30,7 @@ export async function initPayloadE2ENoConfig<T extends GeneratedTypes<T>>({
dirname,
prebuild,
}: Args): Promise<Result<T>> {
const testSuiteName = dirname.split('/').pop()
const testSuiteName = path.basename(dirname)
const { beforeTest } = await createTestHooks(testSuiteName)
await beforeTest()