fix: tests running with local API imported from the payload package instead of the HMR from the next package
This commit is contained in:
@@ -64,7 +64,7 @@ export const getPayloadHMR = async (options: InitOptions): Promise<Payload> => {
|
||||
try {
|
||||
cached.payload = await cached.promise
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {
|
||||
try {
|
||||
const port = process.env.PORT || '3000'
|
||||
const ws = new WebSocket(`ws://localhost:${port}/_next/webpack-hmr`)
|
||||
|
||||
Reference in New Issue
Block a user