chore: ensure node deprecation warnings stay hidden during e2e test runs

This commit is contained in:
Alessio Gravili
2024-04-06 15:06:04 -04:00
parent 5ea5f928ab
commit f29d22ca95
3 changed files with 10 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ export async function initPayloadE2ENoConfig<T extends GeneratedTypes<T>>({
})
}
process.env.NODE_OPTIONS = '--max-old-space-size=8192'
process.env.NODE_OPTIONS = '--max-old-space-size=8192 --no-deprecation'
// @ts-expect-error
const app = nextImport({

View File

@@ -1,4 +1,12 @@
import { defineConfig } from '@playwright/test'
import dotenv from 'dotenv'
import path from 'path'
import { fileURLToPath } from 'url'
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
dotenv.config({ path: path.resolve(dirname, 'test.env') })
export const EXPECT_TIMEOUT = 45000
export const POLL_TOPASS_TIMEOUT = EXPECT_TIMEOUT * 4 // That way expect.poll() or expect().toPass can retry 4 times. 4x higher than default expect timeout => can retry 4 times if retryable expects are used inside

1
test/test.env Normal file
View File

@@ -0,0 +1 @@
NODE_OPTIONS="--no-deprecation"