From 3a034308e1a818c731187265e9cb63aae3488cb7 Mon Sep 17 00:00:00 2001 From: Philzen Date: Tue, 7 Jan 2025 20:36:15 +0100 Subject: [PATCH] Ensure `--load-env-files` is not passed to jest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not sure why this passed as 'loadEnvFiles' into the testHandler, however this fixes the issue at hand – resolves #11884 --- packages/cli/src/commands/testHandler.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/testHandler.js b/packages/cli/src/commands/testHandler.js index 41947eab786f..3cf1068c32ee 100644 --- a/packages/cli/src/commands/testHandler.js +++ b/packages/cli/src/commands/testHandler.js @@ -71,7 +71,14 @@ export const handler = async ({ const rwjsPaths = getPaths() const forwardJestFlags = Object.keys(others).flatMap((flagName) => { if ( - ['watch', 'collect-coverage', 'db-push', '$0', '_'].includes(flagName) + [ + 'watch', + 'collect-coverage', + 'db-push', + 'loadEnvFiles', + '$0', + '_', + ].includes(flagName) ) { // filter out flags meant for the rw test command only return []